安装pip包autopytoexe时出错

2024-06-01 21:10:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试将自动py安装到exe。事实上,我安装了它,但一个月前,我重新安装了Windows10。在那之后,我一直在尝试将auto-py安装到exe。每当我在命令提示符中键入pip install auto-py-to-exe时,这个输出就会出来

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.
我假设微软Visual C++有错,正如我在错误中看到的一样。 error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

< > > ><强> >当我尝试安装微软Visual C++时,我看到这个窗口error in installing Microsoft Visual C++ 14.0 (picture)

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


Tags: installpippynonekblocalgreenletexe
1条回答
网友
1楼 · 发布于 2024-06-01 21:10:26

最后,我终于找出了问题所在。首先,我必须从https://www.lfd.uci.edu/~gohlke/pythonlibs/#greenlet安装一个合适的greenlet车轮文件。然后打开控制盘文件目录中的命令提示符。然后键入 pip install (filename) 之后,再次从https://www.lfd.uci.edu/~gohlke/pythonlibs/#gevent下载gevent的wheel文件。与前面一样,在控制盘文件的目录中打开命令提示符,然后再次键入pip install (filename)。 在所有这些之后,键入pip install auto-py-to-exe

希望这会像对我一样对你有用

相关问题 更多 >