open-mmlab / cocoapi

COCO API - Dataset @ http://cocodataset.org/
Other
46 stars 35 forks source link

ModuleNotFoundError: No module named 'numpy' #24

Open fcakyon opened 3 years ago

fcakyon commented 3 years ago

setup.py is missing numpy dependency, thus pip install mmpycocotools results in the following error:

 Collecting mmpycocotools==12.0.3
  Downloading mmpycocotools-12.0.3.tar.gz (23 kB)
    ERROR: Command errored out with exit status 1:
     command: /opt/hostedtoolcache/Python/3.7.9/x64/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n55lzqzx/mmpycocotools_9bb1c99532a34da6852d8374c105fb62/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n55lzqzx/mmpycocotools_9bb1c99532a34da6852d8374c105fb62/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 /tmp/pip-pip-egg-info-b5d_sp_l
         cwd: /tmp/pip-install-n55lzqzx/mmpycocotools_9bb1c99532a34da6852d8374c105fb62/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-n55lzqzx/mmpycocotools_9bb1c99532a34da6852d8374c105fb62/setup.py", line 1, in <module>
        import numpy as np
    ModuleNotFoundError: No module named 'numpy'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/99/51/1bc1d79f296347eeb2d1a2e0606885ab1e4682833bf275fd39c189952e26/mmpycocotools-12.0.3.tar.gz#sha256=b26f0b3504fad0be8fdb19f3cfa34d86f4ef97694bb403d172f9e7827781b539 (from https://pypi.org/simple/mmpycocotools/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mmpycocotools==12.0.3
ERROR: No matching distribution found for mmpycocotools==12.0.3
Error: Process completed with exit code 1.

Same error can be seen in these action workflows: ubuntu-latest python-3.7, ubuntu-latest python-3.8, windows-latest python-3.8 macos-latest python-3.8

shengdong00 commented 1 year ago

Seems this issue has been closed but I still got the same numpy dependency error when running pip install "git+https://github.com/open-mmlab/cocoapi.git#subdirectory=pycocotools" today. Is it really solved or not?