简体   繁体   English

无法在 ubuntu 安装 pyinstaller

[英]can't install pyinstaller at ubuntu

I'm using python2 and having trouble installing pyinstaller.我正在使用 python2 并且无法安装 pyinstaller。 Here's what I've tried:这是我尝试过的:

root@host:~/setup# pip install pyinstaller
Collecting pyinstaller
  Using cached https://files.pythonhosted.org/packages/82/96/21ba3619647bac2b34b4996b2dbbea8e74a703767ce24192899d9153c058/pyinstaller-4.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-6zdWWq/pyinstaller/setup.py", line 63
        file=sys.stderr)
            ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-6zdWWq/pyinstaller/

From my understanding, Pyinstaller v4.0 does not support Python 2 which is what I assume is being downloaded when you use pip install pyinstaller .据我了解,Pyinstaller v4.0 不支持 Python 2 ,这是我假设您使用pip install pyinstaller时正在下载的内容。

Solution:解决方案:

  1. Visit Pyinstaller Release History to view the version you would like to install (all versions from Python v3.6 down to v3.0 support Python 2)访问Pyinstaller 发布历史以查看您要安装的版本(从 Python v3.6 到 v3.0 的所有版本都支持 Python 2)

  2. Install the Pyinstaller version of your choice using: pip install pyinstaller==3.5 this should work for you!使用以下命令安装您选择的 Pyinstaller 版本: pip install pyinstaller==3.5这应该适合您!

Images below:下图:

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

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

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