Kann nicht importieren von Modulen in python: PyQt4 Konflikte mit SIP

Ich bin neue und meine Deutsch ist nicht sehr gut, aber hier gehe ich:
Ich habe die neueste Arch Linux auf meinem PC und gestern habe ich versucht zu installieren, SIP, ein Python-code-generator für die Verpackung C++ - codes.
Ich habe versucht zu installieren, SIP-und PyQt4 unter einer virtuellen Umgebung.
Ich bekam Schluck aus dem AUR installiert und es auf diese Weise:

http://lucacerone.net/2013/08/installing-pyqt4-and-sip-in-a-virtual-environment-ubuntu-1204/#.Uyx-dGd_phF/

Habe ich es auf diese Weise, weil auf der offiziellen SIP-Dokumentation website, die ich nicht herausfinden, wo es zu installieren und in welches Verzeichnis. Die Dokumentation war nicht klar für mich. Ich weiß jetzt, dass war eine sehr dumme Idee, weil wenn ich versuche, führen Sie ein Skript mit Python ist es notwendig:

python file.py

Ich habe Fehler, denn ich bin mit 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

Was genau sollte ich ändern? Ich habe auch versucht:

sudo pacman -S pyqt5-common 5.2-1 [installed]

(Common PyQt freigegebenen Dateien zwischen python-pyqt5 und python2-pyqt5) und:

pacman -Sy python-qscintilla-common

Vielleicht gibt es eine falsche Bibliothek Abhängigkeit, wie kann ich dieses Problem lösen?


Oh,
Ich installieren möchte PyQt5 aber ich hab das gleiche problem, die gleiche Fehlermeldung, nachdem ich die gemacht habe:

python configure.py
make
sudo make install

in der

full/virtualenv/path/build/SIP/sip-4.15.5/
Ich habe den gleichen Fehler wieder:

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

Ich bin so frustraded, da schrieb ich an arch linux-forum in Englisch und Deutsch, ich bekam keine Antwort nur zu deinstallieren ist es.

Wie soll ich das?
Ich sollte dem Rat Folgen, der hier:
http://lucacerone.net/2013/08/installing-pyqt4-and-sip-in-a-virtual-environment-ubuntu-1204/#.Uyx-dGd_phF/

Soll ich integrieren PyQt5:

full/virtualenv/path/build/PyQT5

weil es bereits in

lib/python3.3/site-packages/PyQt5.

InformationsquelleAutor user3447702 | 2014-03-21

Schreibe einen Kommentar