簡體   English   中英

無法在 ubuntu 安裝 pyinstaller

[英]can't install pyinstaller at ubuntu

我正在使用 python2 並且無法安裝 pyinstaller。 這是我嘗試過的:

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/

據我了解,Pyinstaller v4.0 不支持 Python 2 ,這是我假設您使用pip install pyinstaller時正在下載的內容。

解決方案:

  1. 訪問Pyinstaller 發布歷史以查看您要安裝的版本(從 Python v3.6 到 v3.0 的所有版本都支持 Python 2)

  2. 使用以下命令安裝您選擇的 Pyinstaller 版本: pip install pyinstaller==3.5這應該適合您!

下圖:

在此處輸入圖像描述

在此處輸入圖像描述

在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM