Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Command errored out with exit status 1

Tags:

python

pip

I tried:

pip3 install -r requirements.txt

Here's the error I received:

 Command "python setup.py egg_info" failed with error code 1 in 
 C:\Users\Admin\AppData\Local\Temp\pip-install-6c3rea1s\pycocotools\
 You are using pip version 19.0.3, however version 20.0.2 is available.
 You should consider upgrading via the 'python -m pip install --upgrade pip'
 command.

So, I tried:

pip install --upgrade pip

and

install pip3 install -r requirements.txt

That resulted in more errors:

 ERROR: Command errored out with exit status 1:      command:
 'c:\users\admin\appdata\local\programs\python\python37-32\python.exe'
 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-epmkeh4g\\pycocotools\\setup.py'"'"';
 __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-epmkeh4g\\pycocotools\\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\Admin\AppData\Local\Temp\pip-install-epmkeh4g\pycocotools\pip-egg-info'
         cwd:
 C:\Users\Admin\AppData\Local\Temp\pip-install-epmkeh4g\pycocotools\
    Complete output (5 lines):  Traceback (most recent call last):   
 File "<string>", line 1, in <module>     File
 "C:\Users\Admin\AppData\Local\Temp\pip-install-epmkeh4g\pycocotools\setup.py",
 line 2, in <module>        from Cython.Build import cythonize
    ModuleNotFoundError: No module named 'Cython'
    ---------------------------------------- ERROR: Command errored out
 with exit status 1: python setup.py egg_info Check the logs for full
 command output.

I deleted the folder and re-install, but the results remained the same.

like image 585
nismoa Avatar asked Nov 27 '25 23:11

nismoa


1 Answers

This is a bug in pycocotools. The bug was fixed in 2017 but it seems the fix didn't get into release 2.0 in 2018 (I guess the release process is also buggy).

There is also another similar bug in setup.py — it imports numpy before installing it.

There is no simple workarounds for these bugs using requirements.txt. You need to install the required modules before installing pycocotools:

pip install Cython numpy
pip install -r requirements.txt
like image 119
phd Avatar answered Nov 30 '25 14:11

phd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!