繁体   English   中英

PyInstaller无法安装,Python 3.6.0a4和x64 Windows

[英]PyInstaller won't install, Python 3.6.0a4 and x64 Windows

我说过Python版本(来自https://www.python.org/downloads/windows/ )和x64 Windows10。每次我尝试执行“ pip install pyinstaller”时,它都会崩溃并出现错误:

C:\WINDOWS\system32>pip install pyinstaller
Collecting pyinstaller
  Using cached PyInstaller-3.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\users\jskurski\appdata\local\programs\python\python36\lib\site-packages (from pyinstaller)
Collecting pefile (from pyinstaller)
  Using cached pefile-2016.3.28.tar.gz
Collecting pypiwin32 (from pyinstaller)
  Using cached pypiwin32-219.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\jskurski\AppData\Local\Temp\pip-build-y9lsbd5f\pypiwin32\setup.py", line 121
        print "Building pywin32", pywin32_version
                               ^
    SyntaxError: Missing parentheses in call to 'print'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\jskurski\AppData\Local\Temp\pip-build-y9lsbd5f\pypiwin32\

因此,对我来说似乎有msmatch或其他版本。 不幸的是,我自己无法弄清楚。

有什么建议么? 是否有人在Windows上成功将PyInstaller与最新的3.6 Python一起使用? 还是我应该将Python降级到旧版本?

编辑:在另一台PC(相同的环境)上测试,并且是相同的。

edit2:似乎可以在3.5.2版本上使用,所以暂时可能是一种方法。

pyinstaller需要pypiwin32模块。 当pip尝试安装它时,它显示错误,因为python3.6没有pypiwin32

我降级为稳定的3.5.2后,案例对我来说还是关闭了。 该Alpha版本中可能存在一些不一致之处,从而导致了这种情况。 我只想编写一个简单的GUI Windows程序,所以我将不做进一步研究。

您必须根据您的python版本手动安装pywin32。 您可以下载以下链接。

https://sourceforge.net/projects/pywin32/files/pywin32/Build%20221/

使用正确的python版本安装pywin32后。 必须安装Pyinstaller

正如cdarke所指出的,您正在Python 3上运行python 2代码。

尝试以下方法:

pip3 install pyinstaller

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM