How to install PySide on CentOS?

I want to install ReText on CentOS. There are problems

[ root@localhost scripts-2.6]# python retext.py Traceback (most recent call last): File "retext.py", line 23, in <module> from ReText import QtCore, QtWidgets, QtWebKit, datadirs, globalSettings File "/usr/lib/python2.6/site-packages/ReText/__init__.py", line 21, in <module> from PySide import QtCore, QtGui, QtWebKit ImportError: No module named PySide 

Then I typed yum install PySide and yum install python-pyside to install PySide and got the message No packages available.

I also tried yum search pyside and yum search python- but did not find the PySide package.

+6
source share
3 answers

CentOS repository does not contain PySide. You can add the EPEL repository to your OS and then use: yum install -y python-pyside and it will be installed on your system.

To install the EPEL repository for 64-bit systems, run root as root:

If you are using a 32-bit system, use the following in step 2:

wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

+3
source

There is no python-pyside package in EPEL 7: http://dl.fedoraproject.org/pub/epel/7/x86_64/repoview/letter_p.group.html

This is why you cannot use the Nir Ben-Or solution for CentOS 7.

I solved this with pip install, however you may need to install some prerequisites first.

1) install RPM packages (UPDATED thanks to @fredrik for comment):

 qt-webkit-devel libxml2-devel libxslt-devel rpmdevtools gcc gcc-c++ qt-devel cmake python-devel python-pip 

The pyside should indicate if any RPM files are missing.

2) If the qmake program is not "/ usr / bin / qmake", you may need to do something like this:

 sudo ln -s /usr/bin/qmake-qt4 /usr/bin/qmake 

3) install pyside via pip (it will take some time to complete the build):

 sudo pip install pyside 
+3
source

This is for CentOS 7.

First, make sure you have the necessary conditions:

 sudo yum install epel-release sudo yum install cmake qt-devel qt-webkit-devel libxml2-devel libxslt-devel python-devel rpmdevtools gcc gcc-c++ make python-pip sudo ln -s /usr/bin/qmake-qt4 /usr/bin/qmake 

Now you can install PySide:

 sudo pip install PySide 
+1
source

All Articles