I've been spending the past few days trying to install Spyder (the Python IDE) on CentOS 6.4. There are a couple of issues with installing Spyder on CentOS 6.4: the Qt RPM package does not include QtWebKit and the default install of Python is 2.6.6 rather that 2.7.4. These (and other) issues caused me problems which I was unable to find instructions for, so once I figured it out I decided to let others know.
So without further adieu:
sudo python distribute_setup.py
sudo easy_install pip
sudo pip install spyder
spyder
into a terminal or by selecting Spyder from the Applicaions -> Programming menu. The following packages are highly recommended for Spyder. Install them using sudo pip install <package>
The following packages are highly recommended for general Python development. Install them using sudo pip install <package>
Note: Do not install IPython.
It requires Python 2.7 whereas the default python installation in CentOS6 is Python 2.6.6.
IPython works with Python 2.6, but Spyder has a small bug where it will not load with IPython 0.13.2 and Python 2.6.6.
If anyone finds anything wrong with these instructions, please respond so I can update them.
Thanks!
Question:
How do I install PyQT4, qt-mobility, qtwebkit, PyQt4-webkit for python2.7 on centos 6.4 (remember python2.6 is the system default)?
I used the "Add/Remove Software" gui to install the requirements of 1, 4, 5, 6 and have found why you installed from the rpms...
using the "Add/Remove Software" gui, my PyQT4 installed for python2.6 /usr/lib64/python2.6/site-packages/PyQt4 when I am using python2.7
I am running python 2.7 and therefore the requirements.py does not see PyQT4 installed in the python2.7/site-packages directory instead it is at python2.6/site-packages I left my wrong steps at the bottom to show what not to do...
Thanks for the walkthrough! Appreciate the time you took to write this
I initially started at SIP's source because PyQT4 needs it and after reading the README felt unsure about the SIP source install as it said use build.py and it wasn't there. I looked at pypi and its there https://pypi.python.org/pypi/SIP/4.14.7 apparently pip has the same issue I had after reading the README
sudo /usr/local/bin/pip install SIP
Downloading/unpacking SIP
Downloading sip-4.15-snapshot-972540270afa.zip (856kB): 856kB downloaded
Running setup.py egg_info for package SIP
Traceback (most recent call last):
File "<string>", line 16, in <module>
IOError: [Errno 2] No such file or directory: '/tmp/pip-build-root/SIP/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
IOError: [Errno 2] No such file or directory: '/tmp/pip-build-root/SIP/setup.py'
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-root/SIP
Storing complete log in /root/.pip/pip.log
cd to downloaded source directory of PyQt-x11-gpl-4.10.2
/usr/local/bin/python2.7 configure-ng.py
make
sudo make install
when I jumped ahead and attempted to install the rpm "PyQt4-webkit", it said it was already installed probably due to my yum commands below. But is that for python2.6? I don't have it installed for python2.7....
search in "Add/Remove Software" gui
Or equivalent
sudo yum install PyQt4.x86_64
sudo yum install qt-mobility.x86_64
sudo yum install qtwebkit.x86_64
_
extra for future readers dealing with python2.7 and python2.6 dual installs...
pip --version
make sure it points to python2.7/site-packages/pip-version location and not the 2.6
I have to provide the absolute path because I haven't configured it in my sudo path...
sudo /usr/local/bin/pip install spyder
sudo /usr/local/bin/pip install rope
sudo /usr/local/bin/pip install pyflakes
sudo /usr/local/bin/pip install pylint
sudo /usr/local/bin/pip install pep8
sudo /usr/local/bin/pip install psutil
Well I answered it in the post. Oops.
this install guide is for python 2.6 [default python installation] on centos 6.4
this install guide is not for python 2.7
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.