簡體   English   中英

無法使用pip安裝pyinstaller

[英]Cannot install pyinstaller using pip

我只是想了解如何安裝Pyinstaller。 也許有人可以給我一些建議,因為我肯定會堅持幾個小時。

我正確設置了路徑變量(可以安裝其他軟件),但是通常的命令不起作用:

pip install pyinstaller

這是錯誤

  if sys.maxint > 2L ** 32:

                 ^

  SyntaxError: invalid syntax

在以下輸出中...

    ------------------------------------------------------------
C:\Python34\Scripts\pip run on 11/26/14 00:09:32
Downloading/unpacking pyinstaller
  Getting page https://pypi.python.org/simple/pyinstaller/
  URLs to search for versions for pyinstaller:
  * https://pypi.python.org/simple/pyinstaller/
  Analyzing links from page https://pypi.python.org/simple/pyinstaller/
    Found link https://pypi.python.org/packages/source/P/PyInstaller/PyInstaller-2.1.tar.gz#md5=248531f6fc94b0ffb02473321496d6d0 (from https://pypi.python.org/simple/pyinstaller/), version: 2.1
    Found link https://pypi.python.org/packages/source/P/PyInstaller/PyInstaller-2.1.zip#md5=3eb18a454311707ab7808d881e677329 (from https://pypi.python.org/simple/pyinstaller/), version: 2.1
    Found link https://pypi.python.org/packages/source/P/PyInstaller/pyinstaller-2.0.tar.bz2#md5=c62dd506bcde230d87ea11a1c316b590 (from https://pypi.python.org/simple/pyinstaller/), version: 2.0
    Found link https://pypi.python.org/packages/source/P/PyInstaller/pyinstaller-2.0.zip#md5=19350c07632e4deef5f4ecf64a556637 (from https://pypi.python.org/simple/pyinstaller/), version: 2.0
    Skipping link http://www.pyinstaller.org (from https://pypi.python.org/simple/pyinstaller/); not a file
    Skipping link http://www.pyinstaller.org/wiki#Downloads (from https://pypi.python.org/simple/pyinstaller/); not a file
    Skipping link https://sourceforge.net/projects/pyinstaller/files/ (from https://pypi.python.org/simple/pyinstaller/); not a file
  Not searching http://www.pyinstaller.org (from https://pypi.python.org/simple/pyinstaller/) for files because external urls are disallowed.
  Not searching http://www.pyinstaller.org (from https://pypi.python.org/simple/pyinstaller/) for files because external urls are disallowed.
  Not searching http://www.pyinstaller.org (from https://pypi.python.org/simple/pyinstaller/) for files because external urls are disallowed.
  Not searching http://www.pyinstaller.org (from https://pypi.python.org/simple/pyinstaller/) for files because external urls are disallowed.
  Not searching http://www.pyinstaller.org/wiki#Downloads (from https://pypi.python.org/simple/pyinstaller/) for files because external urls are disallowed.
  Not searching http://www.pyinstaller.org/wiki#Downloads (from https://pypi.python.org/simple/pyinstaller/) for files because external urls are disallowed.
  Not searching https://sourceforge.net/projects/pyinstaller/files/ (from https://pypi.python.org/simple/pyinstaller/) for files because external urls are disallowed.
  Not searching https://sourceforge.net/projects/pyinstaller/files/ (from https://pypi.python.org/simple/pyinstaller/) for files because external urls are disallowed.
  Using version 2.1 (newest of versions: 2.1, 2.1, 2.0, 2.0)
  Downloading from URL https://pypi.python.org/packages/source/P/PyInstaller/PyInstaller-2.1.tar.gz#md5=248531f6fc94b0ffb02473321496d6d0 (from https://pypi.python.org/simple/pyinstaller/)
  Running setup.py (path:C:\Users\Michael\AppData\Local\Temp\pip_build_Michael\pyinstaller\setup.py) egg_info for package pyinstaller
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "C:\Users\Michael\AppData\Local\Temp\pip_build_Michael\pyinstaller\setup.py", line 18, in <module>
        from PyInstaller import get_version
      File "C:\Users\Michael\AppData\Local\Temp\pip_build_Michael\pyinstaller\PyInstaller\__init__.py", line 32, in <module>
        from PyInstaller import compat
      File "C:\Users\Michael\AppData\Local\Temp\pip_build_Michael\pyinstaller\PyInstaller\compat.py", line 129
        if sys.maxint > 2L ** 32:
                         ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "C:\Users\Michael\AppData\Local\Temp\pip_build_Michael\pyinstaller\setup.py", line 18, in <module>

    from PyInstaller import get_version

  File "C:\Users\Michael\AppData\Local\Temp\pip_build_Michael\pyinstaller\PyInstaller\__init__.py", line 32, in <module>

    from PyInstaller import compat

  File "C:\Users\Michael\AppData\Local\Temp\pip_build_Michael\pyinstaller\PyInstaller\compat.py", line 129

    if sys.maxint > 2L ** 32:

                     ^

SyntaxError: invalid syntax

----------------------------------------
Cleaning up...
  Removing temporary dir C:\Users\Michael\AppData\Local\Temp\pip_build_Michael...
Command python setup.py egg_info failed with error code 1 in C:\Users\Michael\AppData\Local\Temp\pip_build_Michael\pyinstaller
Exception information:
Traceback (most recent call last):
  File "c:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "c:\Python34\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:\Python34\lib\site-packages\pip\req.py", line 1229, in prepare_files
    req_to_install.run_egg_info()
  File "c:\Python34\lib\site-packages\pip\req.py", line 325, in run_egg_info
    command_desc='python setup.py egg_info')
  File "c:\Python34\lib\site-packages\pip\util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in C:\Users\Michael\AppData\Local\Temp\pip_build_Michael\pyinstaller

您可以在github上嘗試pyinstaller python3分支。

pip3 install https://github.com/pyinstaller/pyinstaller/archive/python3.zip

暫無
暫無

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

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