gpt4 book ai didi

错误识别的 Python 版本

转载 作者:太空狗 更新时间:2023-10-30 02:44:21 26 4
gpt4 key购买 nike

我已经开始使用 pyqtdeploy 来使用 pyqt 和制作跨平台应用程序。不幸的是,当我实际尝试启动它时,出现错误:

Fatal error in launcher: Unable to create process using C:\Python34\python.exe C:\Python34\pyqtdeploy

我读了this earlier question ,但是 python3 -m pip install pyqtdeploy --upgrade 也给了我一个类似的错误。

使用十六进制编辑器似乎相当冒险和极端?对此还有其他解释/解决方案吗?我的 python34 路径中没有空格,所以这不是问题所在。会不会是我安装的 Python27?

编辑:

我尝试了 py -m pip install pyqtdeploy --upgrade(感谢@Saurabh Randhawa),但这没有用。命令失败并显示以下内容:

Downloading/unpacking pyqtdeploy
Running setup.py (path:c:\users\<username>\appdata\local\temp\pip_build_IronManMark20\pyqtdeploy\setup.py) egg_info for package pyqtdeploy
pyqtdeploy requires Python v3.2 or later
Complete output from command python setup.py egg_info:
pyqtdeploy requires Python v3.2 or later

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in c:\users\<username>\appdata\local\temp\pip_build_IronManMark20\pyqtdeploy
Storing debug log for failure in C:\Users\<username>\pip\pip.log

和 pip.log:

------------------------------------------------------------
C:\Python27\lib\site-packages\pip\__main__.py run on 04/26/15 12:28:05
Downloading/unpacking pyqtdeploy
Getting page https://pypi.python.org/simple/pyqtdeploy/
URLs to search for versions for pyqtdeploy:
* https://pypi.python.org/simple/pyqtdeploy/
Analyzing links from page https://pypi.python.org/simple/pyqtdeploy/
Skipping https://pypi.python.org/packages/py3/p/pyqtdeploy/pyqtdeploy-0.10-py3-none-any.whl#md5=43c6bd10b5a839be52b5729aedcc776b (from https://pypi.python.org/simple/pyqtdeploy/) because it is not compatible with this Python
Skipping https://pypi.python.org/packages/py3/p/pyqtdeploy/pyqtdeploy-0.9-py3-none-any.whl#md5=7ae0f11468cfba8ad42a600b69016db0 (from https://pypi.python.org/simple/pyqtdeploy/) because it is not compatible with this Python
Skipping https://pypi.python.org/packages/py3/p/pyqtdeploy/pyqtdeploy-1.0-py3-none-any.whl#md5=8107db271085ca07000017e46f8c37ac (from https://pypi.python.org/simple/pyqtdeploy/) because it is not compatible with this Python
Skipping https://pypi.python.org/packages/py34/p/pyqtdeploy/pyqtdeploy-0.1-py34-none-any.whl#md5=f0a41a4a5fd56e38f8e616af46bf1b68 (from https://pypi.python.org/simple/pyqtdeploy/) because it is not compatible with this Python
Skipping https://pypi.python.org/packages/py34/p/pyqtdeploy/pyqtdeploy-0.2-py34-none-any.whl#md5=4d3ff35c86c6f58eb20230fbf0082723 (from https://pypi.python.org/simple/pyqtdeploy/) because it is not compatible with this Python
Skipping https://pypi.python.org/packages/py34/p/pyqtdeploy/pyqtdeploy-0.3-py34-none-any.whl#md5=5b0b3954113a91002bcf7067a62d72eb (from https://pypi.python.org/simple/pyqtdeploy/) because it is not compatible with this Python
Skipping https://pypi.python.org/packages/py34/p/pyqtdeploy/pyqtdeploy-0.4-py34-none-any.whl#md5=2c8e0a14c914613c7913e90a7b0f9682 (from https://pypi.python.org/simple/pyqtdeploy/) because it is not compatible with this Python
Skipping https://pypi.python.org/packages/py34/p/pyqtdeploy/pyqtdeploy-0.5-py34-none-any.whl#md5=58419ff7d8825628f566143c8786121c (from https://pypi.python.org/simple/pyqtdeploy/) because it is not compatible with this Python
Skipping https://pypi.python.org/packages/py34/p/pyqtdeploy/pyqtdeploy-0.6-py34-none-any.whl#md5=59cc0a08c1408703a94f2209c43928e9 (from https://pypi.python.org/simple/pyqtdeploy/) because it is not compatible with this Python
Skipping https://pypi.python.org/packages/py34/p/pyqtdeploy/pyqtdeploy-0.7-py34-none-any.whl#md5=d4f69bd23c2b4dcf0f29a86bda9c6ed0 (from https://pypi.python.org/simple/pyqtdeploy/) because it is not compatible with this Python
Skipping https://pypi.python.org/packages/py34/p/pyqtdeploy/pyqtdeploy-0.8-py34-none-any.whl#md5=b653cdc694173741de350287a232643a (from https://pypi.python.org/simple/pyqtdeploy/) because it is not compatible with this Python
Found link https://pypi.python.org/packages/source/p/pyqtdeploy/pyqtdeploy-0.1.tar.gz#md5=32857d8029c8a5ca2b10024abb980b87 (from https://pypi.python.org/simple/pyqtdeploy/), version: 0.1
Found link https://pypi.python.org/packages/source/p/pyqtdeploy/pyqtdeploy-0.10.tar.gz#md5=a84a90faf2327a6cb54117fec5fa16fc (from https://pypi.python.org/simple/pyqtdeploy/), version: 0.10
Found link https://pypi.python.org/packages/source/p/pyqtdeploy/pyqtdeploy-0.2.tar.gz#md5=2c9bf2fe08ba23c6a1be0838e1ec47aa (from https://pypi.python.org/simple/pyqtdeploy/), version: 0.2
Found link https://pypi.python.org/packages/source/p/pyqtdeploy/pyqtdeploy-0.3.tar.gz#md5=ef26df0bf3cda02de2dafb923bfe6847 (from https://pypi.python.org/simple/pyqtdeploy/), version: 0.3
Found link https://pypi.python.org/packages/source/p/pyqtdeploy/pyqtdeploy-0.4.tar.gz#md5=5b6b989d4b21cd3b05a179006298e755 (from https://pypi.python.org/simple/pyqtdeploy/), version: 0.4
Found link https://pypi.python.org/packages/source/p/pyqtdeploy/pyqtdeploy-0.5.tar.gz#md5=3ac7526e302e77cfdae057018a2af600 (from https://pypi.python.org/simple/pyqtdeploy/), version: 0.5
Found link https://pypi.python.org/packages/source/p/pyqtdeploy/pyqtdeploy-0.6.tar.gz#md5=e4cf32765d9c9aa6e04fcea12fcb4bc0 (from https://pypi.python.org/simple/pyqtdeploy/), version: 0.6
Found link https://pypi.python.org/packages/source/p/pyqtdeploy/pyqtdeploy-0.7.tar.gz#md5=bb3b5c0fa0c3ddfaea287e7438ede58c (from https://pypi.python.org/simple/pyqtdeploy/), version: 0.7
Found link https://pypi.python.org/packages/source/p/pyqtdeploy/pyqtdeploy-0.8.tar.gz#md5=b3d6faf50be4784ec1a1f0709c3acc27 (from https://pypi.python.org/simple/pyqtdeploy/), version: 0.8
Found link https://pypi.python.org/packages/source/p/pyqtdeploy/pyqtdeploy-0.9.tar.gz#md5=da00b401948436c915245084df93222f (from https://pypi.python.org/simple/pyqtdeploy/), version: 0.9
Found link https://pypi.python.org/packages/source/p/pyqtdeploy/pyqtdeploy-1.0.tar.gz#md5=97f852bd368acd739228dad7aae46c44 (from https://pypi.python.org/simple/pyqtdeploy/), version: 1.0
Using version 1.0 (newest of versions: 1.0, 0.10, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1)
Downloading from URL https://pypi.python.org/packages/source/p/pyqtdeploy/pyqtdeploy-1.0.tar.gz#md5=97f852bd368acd739228dad7aae46c44 (from https://pypi.python.org/simple/pyqtdeploy/)
Running setup.py (path:c:\users\<username>\appdata\local\temp\pip_build_IronManMark20\pyqtdeploy\setup.py) egg_info for package pyqtdeploy
pyqtdeploy requires Python v3.2 or later
Complete output from command python setup.py egg_info:
pyqtdeploy requires Python v3.2 or later

----------------------------------------
Cleaning up...
Removing temporary dir c:\users\<username>\appdata\local\temp\pip_build_IronManMark20...
Command python setup.py egg_info failed with error code 1 in c:\users\<username>\appdata\local\temp\pip_build_IronManMark20\pyqtdeploy
Exception information:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python27\lib\site-packages\pip\req.py", line 1229, in prepare_files
req_to_install.run_egg_info()
File "C:\Python27\lib\site-packages\pip\req.py", line 325, in run_egg_info
command_desc='python setup.py egg_info')
File "C:\Python27\lib\site-packages\pip\util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in c:\users\<username>\appdata\local\temp\pip_build_IronManMark20\pyqtdeploy

我知道我正在运行 Python 3.4.2。是什么原因造成的?它说版本错误,但显然不是。

EDIT2:好吧,这真的很奇怪,我尝试再次运行该命令(没有尝试任何解决方案!),它成功了。工作代码:python3 -m pip install pyqtdeploy --upgrade。为什么我不做任何更改就会发生这种变化?

当我编辑时,我在 64 位 Windows 上运行 32 位 Python(两个版本)。

最佳答案

日志中的这一行:

C:\Python27\lib\site-packages\pip\__main__.py

证明除了 3.4 版本之外,您还安装了 Python2.7 并且...这就是 pip 使用的版本!

根据 Python 3.4 手册的建议,您可以尝试明确地使用 py -3 :

py -3   -m pip install pyqtdeploy --upgrade  # default Python 3
py -3.4 -m pip install pyqtdeploy --upgrade # specifically Python 3.4

py 的神奇之处在于,当您安装了多个 Python 版本时(这似乎是您的情况),它可以找到并启动正确的 Python 版本。

关于错误识别的 Python 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29879504/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com