我已经开始使用pyqtdeploy来使用pyqt并制作跨平台的应用程序。不幸的是,当我试图启动它时,我会得到一个错误:
启动程序中的致命错误:无法使用C:\Python34\python.exe C:\Python34 34\pyqtdeploy创建进程
我读过this earlier question,但python3 -m pip install pyqtdeploy --upgrade也给了我一个类似的错误。
和一个妖术编辑在一起似乎很冒险,也很极端?对此还有其他解释/解决办法吗?我的python34路径中没有空格,所以这不可能是问题所在。会不会是我的Python27安装?
编辑:
我试过了py -m pip install pyqtdeploy --upgrade (谢谢@Saurabh ),但这行不通。该命令失败,原因如下:
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我知道我正在运行Python3.4.2。是什么导致了这一切?它说这个版本是错误的,但它显然不是。
EDIT2:好吧,这真的很奇怪,我尝试再次运行这个命令(而没有尝试任何解决方案!),它成功了。工作代码:python3 -m pip install pyqtdeploy --upgrade。为什么我不改变就改变了呢?
在编辑时,我在64位窗口上运行32位Python (两个版本)。
发布于 2015-05-05 08:24:09
日志中的这一行:
C:\Python27\lib\site-packages\pip\__main__.py证明除了3.4个安装之外,还有Python2.7安装,并且.这是pip使用的!
正如Python3.4手册所建议的,您可以尝试使用明确的py -3:
py -3 -m pip install pyqtdeploy --upgrade # default Python 3
py -3.4 -m pip install pyqtdeploy --upgrade # specifically Python 3.4py的神奇之处在于,当您安装了多个版本(似乎是您的情况)时,就可以找到并启动它来更正Python。
发布于 2015-04-26 18:19:15
1. Click Start, click All Programs, and then click Accessories.
2. Right-click Command prompt, and then click Run as administrator.
3. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
py -m pip install pyqtdeploy --upgrade型发布于 2015-05-05 08:06:08
Python (至少在windows下)设置PYTHONPATH环境变量,例如:
C:\Users\vyktor>SET PYTHONPATH
PYTHONPATH=C:\Python32\Lib;C:\Python32\DLLs;C:\Python32\Lib\lib-tk所以您可能已经将PYTHONPATH设置为27版本..。
尝试手工设置值:
C:\Users\vyktor>SET PYTHONPATH=C:\Python34\Lib
C:\Users\vytkor>SET PYTHONPATH
PYTHONPATH=C:\Python34\Lib重新执行你的脚本,它应该能正常工作。
https://stackoverflow.com/questions/29879504
复制相似问题