I'm new and my english is not very well, but here I go: I have the newest Arch Linux on my PC and yesterday I tried to install SIP, a Python code generator for wrapping C++ codes. I tried to install SIP and PyQt4 under a virtual enviroment. I got SIP from the AUR, and installed it this way:
I did it this way because on the official SIP-documentation website I didn't figure out where to install it and in which directory. The documentation was not clear for me. I know now, that was a very stupid idea because when I try to run a pyhton script with:
python file.py
I got errors because I'm using Python 3.3.4:
[vain@chinchi2 python_programme]$ python test.py
Traceback (most recent call last):
File "test.py", line 25, in <module>
import matplotlib.pyplot as plt
File "/usr/lib/python3.3/site-packages/matplotlib/pyplot.py", line 98, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/usr/lib/python3.3/site-packages/matplotlib/backends/__init__.py", line 28, in pylab_setup
globals(),locals(),[backend_name],0)
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_qt4agg.py", line 13, in <module>
from .backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_qt4.py", line 21, in <module>
import matplotlib.backends.qt4_editor.figureoptions as figureoptions
File "/usr/lib/python3.3/site-packages/matplotlib/backends/qt4_editor/figureoptions.py", line 13, in <module>
import matplotlib.backends.qt4_editor.formlayout as formlayout
File "/usr/lib/python3.3/site-packages/matplotlib/backends/qt4_editor/formlayout.py", line 51, in <module>
from matplotlib.backends.qt4_compat import QtGui,QtCore
File "/usr/lib/python3.3/site-packages/matplotlib/backends/qt4_compat.py", line 56, in <module>
from PyQt4 import QtCore, QtGui
RuntimeError: the sip module implements API v11.0 but the PyQt4.QtCore module requires API v10.1
What exactly should I change? I also tried:
sudo pacman -S pyqt5-common 5.2-1 [installed]
(Common PyQt files shared between python-pyqt5 and python2-pyqt5) and:
pacman -Sy python-qscintilla-common
Maybe there exists a false library dependency, how can I solve this?
Oh,
I want to install PyQt5 but I got the same problem, the same error after I did:
python configure.py
make
sudo make install
in the
full/virtualenv/path/build/SIP/sip-4.15.5/
I got the same errors again:
from PyQt4 import QtCore, QtGui
RuntimeError: the sip module implements API v11.0 but the PyQt4.QtCore module requires API v10.1
[vain@chinchi2 python_programme]$ python2 erstenprog.py
Traceback (most recent call last):
File "erstenprog.py", line 26, in <module>
import matplotlib.pyplot as plt
ImportError: No module named matplotlib.pyplot
I'm so frustraded, because I wrote to arch linux forum in english and german, I got no answer only to deinstalled it.
How I'm supposed to this? I just should follow the advice here: http://lucacerone.net/2013/08/installing-pyqt4-and-sip-in-a-virtual-environment-ubuntu-1204/#.Uyx-dGd_phF/
Shoul I integrate PyQt5 in the:
full/virtualenv/path/build/PyQT5
because it already exists in
lib/python3.3/site-packages/PyQt5
.