繁体   English   中英

安装 pip package auto-py-to-exe 时出错

[英]Error in installing pip package auto-py-to-exe

我正在尝试安装 auto-py-to-exe。 事实上,我安装了它,但几个月前,我重新安装了我的 windows 10。之后,我不断尝试安装 auto-py-to-exe。 每当我在命令提示符下输入pip install auto-py-to-exe时,这个 output 就会出现

Collecting auto-py-to-exe
  Using cached auto_py_to_exe-2.7.11-py2.py3-none-any.whl (75 kB)
Collecting Eel==0.12.4
  Using cached Eel-0.12.4.tar.gz (15 kB)
Collecting pyinstaller>=4.1
  Using cached pyinstaller-4.1.tar.gz (3.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting bottle
  Using cached bottle-0.12.19-py3-none-any.whl (89 kB)
Collecting bottle-websocket
  Using cached bottle-websocket-0.2.9.tar.gz (2.0 kB)
Collecting future
  Using cached future-0.18.2.tar.gz (829 kB)
Collecting whichcraft
  Using cached whichcraft-0.6.1-py2.py3-none-any.whl (5.2 kB)
Collecting pyinstaller-hooks-contrib>=2020.6
  Using cached pyinstaller_hooks_contrib-2020.11-py2.py3-none-any.whl (172 kB)
Collecting altgraph
  Using cached altgraph-0.17-py2.py3-none-any.whl (21 kB)
Requirement already satisfied: setuptools in c:\users\mniza\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller>=4.1->auto-py-to-exe) (49.2.1)
Collecting pywin32-ctypes>=0.2.0; sys_platform == "win32"
  Using cached pywin32_ctypes-0.2.0-py2.py3-none-any.whl (28 kB)
Collecting pefile>=2017.8.1; sys_platform == "win32"
  Using cached pefile-2019.4.18.tar.gz (62 kB)
Collecting gevent-websocket
  Using cached gevent_websocket-0.10.1-py3-none-any.whl (22 kB)
Collecting gevent
  Using cached gevent-20.12.1.tar.gz (5.9 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\mniza\appdata\local\programs\python\python39\python.exe' 'c:\users\mniza\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 40.8.0' wheel 'Cython >= 3.0a5' 'cffi >= 1.12.3 ; platform_python_implementation == '"'"'CPython'"'"'' 'greenlet >= 0.4.17, < 2.0 ; platform_python_implementation == '"'"'CPython'"'"''
       cwd: None
  Complete output (29 lines):
  Collecting setuptools>=40.8.0
    Using cached setuptools-51.1.1-py3-none-any.whl (2.0 MB)
  Collecting wheel
    Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
  Collecting Cython>=3.0a5
    Using cached Cython-3.0a6-py2.py3-none-any.whl (1.0 MB)
  Collecting cffi>=1.12.3
    Using cached cffi-1.14.4-cp39-cp39-win_amd64.whl (179 kB)
  Collecting greenlet<2.0,>=0.4.17
    Using cached greenlet-0.4.17.tar.gz (61 kB)
  Collecting pycparser
    Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
  Using legacy 'setup.py install' for greenlet, since package 'wheel' is not installed.
  Installing collected packages: setuptools, wheel, Cython, pycparser, cffi, greenlet
      Running setup.py install for greenlet: started
      Running setup.py install for greenlet: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: 'c:\users\mniza\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mniza\\AppData\\Local\\Temp\\pip-install-c3p25el7\\greenlet\\setup.py'"'"'; __file__='"'"'C:\\Users\\mniza\\AppData\\Local\\Temp\\pip-install-c3p25el7\\greenlet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\mniza\AppData\Local\Temp\pip-record-sq3sf8sv\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay' --compile --install-headers 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay\Include\greenlet'
           cwd: C:\Users\mniza\AppData\Local\Temp\pip-install-c3p25el7\greenlet\
      Complete output (5 lines):
      running install
      running build
      running build_ext
      building 'greenlet' extension
      error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
      ----------------------------------------
  ERROR: Command errored out with exit status 1: 'c:\users\mniza\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mniza\\AppData\\Local\\Temp\\pip-install-c3p25el7\\greenlet\\setup.py'"'"'; __file__='"'"'C:\\Users\\mniza\\AppData\\Local\\Temp\\pip-install-c3p25el7\\greenlet\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\mniza\AppData\Local\Temp\pip-record-sq3sf8sv\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay' --compile --install-headers 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay\Include\greenlet' Check the logs for full command output.
  WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
  You should consider upgrading via the 'c:\users\mniza\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\mniza\appdata\local\programs\python\python39\python.exe' 'c:\users\mniza\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\mniza\AppData\Local\Temp\pip-build-env-hh9ixh_9\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 40.8.0' wheel 'Cython >= 3.0a5' 'cffi >= 1.12.3 ; platform_python_implementation == '"'"'CPython'"'"'' 'greenlet >= 0.4.17, < 2.0 ; platform_python_implementation == '"'"'CPython'"'"'' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
You should consider upgrading via the 'c:\users\mniza\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.

我认为 Microsoft Visual C++ 有问题,正如我在错误error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/ error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

但是当我尝试安装 Microsoft Visual C++ 时,我在安装 Microsoft Visual C++ 14.0 时看到这个 window 错误(图片)

我再次检查了程序列表,我有点困惑应该卸载哪个,应该保留哪个程序列表(图片) 总的来说,我在这个问题上停留了三个多星期,如果有人能解决这个问题,我将不胜感激。

最后,我弄清楚了问题所在。 首先,我必须从https://www.lfd.uci.edu/~gohlke/pythonlibs/#greenlet安装一个合适的 greenlet 轮文件。 然后在wheel文件的目录下打开命令提示符。 然后输入pip install (filename)之后,再次从https://www.lfd.uci.edu/~gohlke/pythonlibs/#gevent下载 gevent 的轮子文件。 和之前一样,在 wheel 文件目录中打开命令提示符并再次键入pip install (filename) 毕竟,输入pip install auto-py-to-exe

希望这对你有用,因为它对我有用!

暂无
暂无

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

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