2015-11-21 49 views
0

進口QtGui我剛剛下載並安裝PySide,當我嘗試從PySide錯誤從Pyside

$ python -c "from PySide import QtGui" 
Traceback (most recent call last): 
    File "<string>", line 1, in <module> 
ImportError: dlopen(/Library/Python/2.7/site-packages/PySide/QtGui.so, 2): Symbol not found: __ZN7QLayout11adoptLayoutEPS_ 
    Referenced from: /Library/Python/2.7/site-packages/PySide/QtGui.so 
    Expected in: /Library/Frameworks/QtGui.framework/Versions/4/QtGui 
in /Library/Python/2.7/site-packages/PySide/QtGui.so 

任何幫助,將不勝感激導入QtGui我得到這個錯誤。

回答

0

昨天剛從pip安裝了PySide。 經過「蟒蛇-c‘從PySide進口QtGui’的一切。進口精

杉杉檢查,如果你在有QtGui.so‘/Library/Python/2.7/site-packages/PySide/’目錄,導致有。

一些一個月前試圖從源代碼安裝PyQt的得到了與編譯的問題:一切都看起來不錯,但有些模塊(包括QtGui)缺席(不記得,但問題是,在一些配置文件)

0

嘗試刪除:__ZN7QLayout11adoptLayoutEPS_ from /Library/Python/2.7/site-packages/PySide/QtCore.so文件。

你的代碼是正確的:蟒蛇-c 「從PySide進口QtGui」 ,但問題是你的OS系統上,從官方網站上下載PySide:https://pypi.python.org/packages/f1/32/63872fdc1d9e0de5aa0b05b9d1a17d868851c619cdc6998dd9d853556f1b/PySide-1.2.1.tar.gz#md5=b551d6ff68685013b59e478571f775bf

如果您使用的是Windows,運行cmd並輸入以下命令:

cd <type here the python path> 
example: cd C:\Python27 

和類型:

python <here the path of the extracted and download pyside file>\setup.py install 
example: python C:\users\someuser\pysyde_extractedfiles\setup.py install 

如果你是usinc的Mac OS X上運行的終端類型:

cd /<you_python_install_dir> 
python /<your_extracted_pyside_files_path/setup.py install> 
example: cd /opt/python27 && python /tmp/pyside_extracted/setup.py install 

如果您如果使用使用Linux(Ubuntu的,Debian的,ArchLinux的)

wget <here_the_pyside_download_url> 
cd /home/<you_username>/<you_extracted_pyside_folder> 
python setup.py install 

python3然後鍵入:

python3 setup.py install 

我希望這能幫到你!

相關問題