我在使用命令pip install pyinstaller安装pyinstaller时遇到问题

2024-09-28 19:29:29 发布

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

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检查日志以获得完整的命令输出


Tags: inpyinitlibpackageslocalsetupline
2条回答

我遇到了一个类似于“为pefile运行setup.py安装…错误”的错误

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

我在带有python2.7python3.8.\pip2.exe install pyinstaller.\pip3.exe install pyinstaller的windows上安装pyinstaller(请在机器中安装python的python38\Scripts\文件夹中运行.\pip3.exe)。我没有任何错误

请检查pefile模块,安装.\pip3.exe install pefile,我认为这是您的问题

并检查github上的问题:

https://github.com/erocarrera/pefile

https://github.com/pyinstaller/pyinstaller

相关问题 更多 >