简体   繁体   中英

setup.py egg_info error code 3221225477

I've been trying to install IMGAUG package for an ML project. But the installation gets stuck when it tries to install scikit-image

My input: pip install scikit-image

output:

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\

Note: I've already tried installing other versions of it, upgrading setuptools and pip. Error persists.

PS: Now it's showing up on everything I try to install.

(Scroll down to a horizontal line to skip explanation and go straight to the suggested solution if you wish)

3221225477 is 0xC0000005 which is NTSTATUS STATUS_ACCESS_VIOLATION ; the corresponsing error message is The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. 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 . If you install Visual Studio, you'll be able to pinpoint the exact module at fault as shown on the link.

Now, this error means a bug in or an incompatibility between some of your installed extension modules (or in Python engine itself, but this is very unlikely in comparison).

The easiest way to fix is to clean up any problems with the involved modules' installation and (if that isn't enough) update them to the latest versions, hoping that whatever is causing that is fixed in them.

  • In particular, scipy in c:\\users\\*<username>*\\appdata\\local\\programs\\python\\python37\\lib\\site-packages looks suspicious: you aren't using --user in your pip command

    • which suggests that your didn't pay attention to this flag when using pip before ( it's official that it CAN lead to version conflicts ), and some of your installed packages are installed both into %ProgramFiles%\\Python37\\Lib\\site-packages and %APPDATA%\\Python\\Python37\\ib\\site-packages , with different versions in these two locations.

I hereby suggest you to:

  • decide where you want your 3rd-party modules to be
    • %ProgramFiles% is system-wide and requires elevation to manage, %APPDATA% is per-user and doesn't require elevation
    • Unless you don't have administrative rights at your machine (you do, judging by the command you gave) or have special needs, keep everything in the system-wide location for simplicity
  • uninstall all the modules in the other location ( pip uninstall <name(s)> with or without --user )
  • reinstall them to the desired location, updating existing versions ( -U pip flag)
  • if that wasn't enough to solve the problem (very unlikely), update all packages to the latest versions

This happened to me also. However I resolved it by uninstalling the package (pip uninstall ), then installing it using conda rather than pip (conda install ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM