python - 我在使用以下命令安装 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 检查日志以获取完整的命令输出。
解决方案
我遇到了与“为 pefile 运行 setup.py install ... 错误”类似的错误
解决方案很简单,以管理员身份运行 cmd并成功安装
推荐阅读
- javascript - 循环内的顺序 http 请求
- regex - 重定向域和页面 ID
- git - 分支合并时忽略一些文件
- simulation - AnyLogic 在一个过程中更改参数值
- c# - 根据 2 列值从数据集中删除重复数据
- javascript - JS RegEx 删除部分 URL?
- json - JSON 解析失败:CF18 中 JSON 字符串意外结束
- java - 如何使用材料步进器库单击完成时将片段中输入的所有数据保存到数据库中
- html - 如何将垂直文本导航栏粘贴到右侧而没有间隙?
- java - Java Arraylist 中的 UnsupportedOperationException 错误