首页 > 解决方案 > 我在使用以下命令安装 pyinstaller 时遇到问题:pip install pyinstaller

问题描述

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS F:\coding and website developing\learning PYTHON\FreeCodeCamp\Space Shooter> pip install pyinstaller
Collecting pyinstaller
  Using cached PyInstaller-3.6.tar.gz (3.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting altgraph
  Using cached altgraph-0.17-py2.py3-none-any.whl (21 kB)
Collecting pywin32-ctypes>=0.2.0
  Using cached pywin32_ctypes-0.2.0-py2.py3-none-any.whl (28 kB)
Collecting pefile>=2017.8.1
  Using cached pefile-2019.4.18.tar.gz (62 kB)




ERROR: Command errored out with exit status 1:
 command: 'c:\users\pbdgr\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pbdgr\\AppData\\Local\\Temp\\pip-install-a8pv6z1h\\pefile\\setup.py'"'"'; __file__='"'"'C:\\Users\\pbdgr\\AppData\\Local\\Temp\\pip-install-a8pv6z1h\\pefile\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\pbdgr\AppData\Local\Temp\pip-pip-egg-info-xrjitowd'
     cwd: C:\Users\pbdgr\AppData\Local\Temp\pip-install-a8pv6z1h\pefile\
Complete output (26 lines):
Traceback (most recent call last):
  File "c:\users\pbdgr\appdata\local\programs\python\python37\lib\site-packages\pkg_resources\__init__.py", line 2857, in get_entry_map    
    ep_map = self._ep_map
  File "c:\users\pbdgr\appdata\local\programs\python\python37\lib\site-packages\pkg_resources\__init__.py", line 2815, in __getattr__      
    raise AttributeError(attr)
AttributeError: _ep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\pbdgr\AppData\Local\Temp\pip-install-a8pv6z1h\pefile\setup.py", line 91, in <module>
    'future',
  File "c:\users\pbdgr\appdata\local\programs\python\python37\lib\site-packages\setuptools\__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "c:\users\pbdgr\appdata\local\programs\python\python37\lib\site-packages\setuptools\__init__.py", line 133, in _install_setup_requires
    (k, v) for k, v in attrs.items()
  File "c:\users\pbdgr\appdata\local\programs\python\python37\lib\site-packages\setuptools\dist.py", line 443, in __init__
    for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
  File "c:\users\pbdgr\appdata\local\programs\python\python37\lib\site-packages\pkg_resources\__init__.py", line 656, in <genexpr>
    for entry in dist.get_entry_map(group).values()
  File "c:\users\pbdgr\appdata\local\programs\python\python37\lib\site-packages\pkg_resources\__init__.py", line 2860, in get_entry_map    
    self._get_metadata('entry_points.txt'), self
  File "c:\users\pbdgr\appdata\local\programs\python\python37\lib\site-packages\pkg_resources\__init__.py", line 2531, in parse_map        
    raise ValueError("Entry points must be listed in groups")
ValueError: Entry points must be listed in groups
----------------------------------------

错误:命令出错,退出状态为 1:python setup.py egg_info 检查日志以获取完整的命令输出。

标签: pythonpyinstaller

解决方案


我遇到了与“为 pefile 运行 setup.py install ... 错误”类似的错误

解决方案很简单,以管理员身份运行 cmd并成功安装


推荐阅读