I am using Ubuntu 14.04. I installed pyenv
and then installed Python 3.4.2 under pyenv
. Then I switched to version 3.4.2:
$ pyenv global 3.4.2
Now I would like to install ipython
and the qtconsole
:
$ pip install ipython
$ ipython3 qtconsole &
This gives an error message (traceback not shown):
ImportError:
Could not load requested Qt binding. Please ensure that
PyQt4 >= 4.7 or PySide >= 1.0.3 is available,
and only one is imported per session.
Currently-imported Qt library: Noneu
PyQt4 installed: False
PySide >= 1.0.3 installed: False
Tried to load: ['pyside', 'pyqt']
Then I tried:
$ pip install pyside
which gives error (some parts of output removed):
Installing collected packages: pyside
Running setup.py install for pyside
Removing /tmp/pip_build_hakon/pyside/pyside_package
Python architecture is 64bit
Failed to locate a dynamic Python library, using /home/hakon/.pyenv/versions/3.4.2/lib/libpython3.4m.a
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
Failed to query the Qt version with qmake /usr/bin/qmake
Update
From the previous error message I figured I had to do
$ sudo apt-get install qt4-qmake
And then I got some new error messages, which led me to run:
$ sudo apt-get install libxslt-dev
$ sudo apt-get install qt4-default
Now, when I run:
$ pip install pyside
I get error (first part of output cut out):
[ 83%] Building CXX object libshiboken/CMakeFiles/libshiboken.dir/shibokenbuffer.cpp.o
Linking CXX shared library libshiboken.cpython-34m.so
/usr/bin/ld: /home/hakon/.pyenv/versions/3.4.2/lib/libpython3.4m.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/home/hakon/.pyenv/versions/3.4.2/lib/libpython3.4m.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status