我一直在尝试安装PyQt,但是卡在下面的错误上。我已经阅读了一些帖子,建议我升级PIP、setup_tools和ez_install。我已经尝试过所有这些,但没有成功。有什么建议吗?
c:\Python27>pip install PyQt5_gpl-5.10.tar.gz
Processing c:\python27\pyqt5_gpl-5.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\program files (x86)\python36-32\lib\tokenize.py", line 452, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\JAME~1.KRK\\AppData\\Local\\Temp\\pip-0u8uht47-build\\setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\JAME~1.KRK\AppData\Local\Temp\pip-0u8uht47-build\
在3.6中同样的事情:
c:\Program Files (x86)\Python36-32>pip install PyQt5_gpl-5.10.tar.gz
Processing c:\program files (x86)\python36-32\pyqt5_gpl-5.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\program files (x86)\python36-32\lib\tokenize.py", line 452, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\JAME~1.KRK\\AppData\\Local\\Temp\\pip-f9s0_6sp-build\\setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\JAM~1.KRK\AppData\Local\Temp\pip-f9s0_6sp-build\
pip3 install PyQt5
时。我更新了pip(pip3 install --upgrade pip
),然后再次尝试安装。更新之后,我得到了一个更详细的错误提示,让我知道问题与权限有关。将安装切换为用户级别解决了我的问题,即pip3 install --user PyQt5
。我正在运行Ubuntu……所以我不确定对Windows用户是否有用…… - RTbecard