setup.py egg_info 错误代码 3221225477
setup.py egg_info error code 3221225477
我一直在尝试为 ML 项目安装 IMGAUG
包。但是安装在尝试安装 scikit-image
时卡住了
我的输入:pip install scikit-image
输出:
Collecting imgaug
Using cached
https://files.pythonhosted.org/...
Requirement already satisfied: scipy in
c:\users\*<username>*\appdata\local\programs\python\python37\lib\site-
packages (from imgaug) (1.1.0)
Collecting scikit-image>=0.11.0 (from imgaug)
Using cached https://files.pythonhosted.org/packages/...
Complete output from command python setup.py egg_info:
----------------------------------------
Command "python setup.py egg_info" failed with error code 3221225477 in
C:\Users\<name>~1.<name2>\AppData\Local\Temp\pip-install-qmdp6ysz\scikit-image\
注意:我已经尝试安装它的其他版本,升级 setuptools 和 pip。错误仍然存在。
PS:现在它出现在我尝试安装的所有内容上。
(向下滚动到水平线以跳过解释,如果您愿意,可以直接转到建议的解决方案)
3221225477
是 0xC0000005
which is NTSTATUS
STATUS_ACCESS_VIOLATION
;对应的错误信息是The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
.
In Windows, a process usually quits with this exit code if it tries to access an invalid memory address and Windows terminates it as a result。如果您安装 Visual Studio,您将能够精确定位出现故障的模块,如 link.
所示
现在,此错误意味着您安装的某些扩展模块中存在错误或不兼容(或 Python 引擎本身,但相比之下这不太可能)。
最简单的修复方法是清除相关模块安装的任何问题,并且(如果这还不够)将它们更新到最新版本,希望任何导致问题的原因都已在其中修复。
特别是,scipy in c:\users\*<username>*\appdata\local\programs\python\python37\lib\site-packages
看起来很可疑:您没有在 pip
命令中使用 --user
- 这说明你在之前(it's official that it CAN lead to version conflicts)使用
pip
时没有注意这个标志,你安装的一些包同时安装到%ProgramFiles%\Python37\Lib\site-packages
和%APPDATA%\Python\Python37\ib\site-packages
,这两个位置有不同的版本。
我在此建议您:
- 确定您希望第 3 方模块所在的位置
%ProgramFiles%
是系统范围的,需要提升才能管理,%APPDATA%
是针对每个用户的,不需要提升
- 除非您在您的机器上没有管理权限(您有,根据您给出的命令判断)或有特殊需要,为简单起见,将所有内容保存在系统范围的位置
- 卸载其他位置的所有模块(
pip uninstall <name(s)>
有或没有 --user
)
- 将它们重新安装到所需位置,更新现有版本(
-U
pip 标志)
- 如果这还不足以解决问题(可能性很小),update all packages to the latest versions
我也遇到过这种情况。但是我通过卸载包 (pip uninstall ) 解决了它,然后使用 conda 而不是 pip (conda install ) 安装它。
我一直在尝试为 ML 项目安装 IMGAUG
包。但是安装在尝试安装 scikit-image
我的输入:pip install scikit-image
输出:
Collecting imgaug
Using cached
https://files.pythonhosted.org/...
Requirement already satisfied: scipy in
c:\users\*<username>*\appdata\local\programs\python\python37\lib\site-
packages (from imgaug) (1.1.0)
Collecting scikit-image>=0.11.0 (from imgaug)
Using cached https://files.pythonhosted.org/packages/...
Complete output from command python setup.py egg_info:
----------------------------------------
Command "python setup.py egg_info" failed with error code 3221225477 in
C:\Users\<name>~1.<name2>\AppData\Local\Temp\pip-install-qmdp6ysz\scikit-image\
注意:我已经尝试安装它的其他版本,升级 setuptools 和 pip。错误仍然存在。
PS:现在它出现在我尝试安装的所有内容上。
(向下滚动到水平线以跳过解释,如果您愿意,可以直接转到建议的解决方案)
3221225477
是 0xC0000005
which is NTSTATUS
STATUS_ACCESS_VIOLATION
;对应的错误信息是The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
.
In Windows, a process usually quits with this exit code if it tries to access an invalid memory address and Windows terminates it as a result。如果您安装 Visual Studio,您将能够精确定位出现故障的模块,如 link.
所示现在,此错误意味着您安装的某些扩展模块中存在错误或不兼容(或 Python 引擎本身,但相比之下这不太可能)。
最简单的修复方法是清除相关模块安装的任何问题,并且(如果这还不够)将它们更新到最新版本,希望任何导致问题的原因都已在其中修复。
特别是,
scipy in c:\users\*<username>*\appdata\local\programs\python\python37\lib\site-packages
看起来很可疑:您没有在pip
命令中使用--user
- 这说明你在之前(it's official that it CAN lead to version conflicts)使用
pip
时没有注意这个标志,你安装的一些包同时安装到%ProgramFiles%\Python37\Lib\site-packages
和%APPDATA%\Python\Python37\ib\site-packages
,这两个位置有不同的版本。
- 这说明你在之前(it's official that it CAN lead to version conflicts)使用
我在此建议您:
- 确定您希望第 3 方模块所在的位置
%ProgramFiles%
是系统范围的,需要提升才能管理,%APPDATA%
是针对每个用户的,不需要提升- 除非您在您的机器上没有管理权限(您有,根据您给出的命令判断)或有特殊需要,为简单起见,将所有内容保存在系统范围的位置
- 卸载其他位置的所有模块(
pip uninstall <name(s)>
有或没有--user
) - 将它们重新安装到所需位置,更新现有版本(
-U
pip 标志) - 如果这还不足以解决问题(可能性很小),update all packages to the latest versions
我也遇到过这种情况。但是我通过卸载包 (pip uninstall ) 解决了它,然后使用 conda 而不是 pip (conda install ) 安装它。