当我“pip install mmseg”时,出现错误“NameError: name 'reload' is not defined”

时间:2021-05-24 02:35:28

标签: python installation pip pytorch

但是,当我 pip install mmseg 时,我遇到了同样的问题。那么,我该怎么办?

日志是这样的:

(Monocular3D) root@gpu9:~/MonoRUn$ pip3 install mmseg -i http://pypi.douban.com/simple/  --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple/
Collecting mmseg
  Downloading http://pypi.doubanio.com/packages/f8/31/3bc9205f39cc8ab37193a6fbb24693993b2f305aba9f35b09fad882107ee/mmseg-1.3.0.tar.gz (817 kB)
     |████████████████████████████████| 817 kB 4.4 MB/s
    ERROR: Command errored out with exit status 1:
     command: /home/root/miniconda3/envs/Monocular3D/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sz89ieuw/mmseg_86227a7da2734023a199ab7a10d06662/setup.py'"'"';
__file__='"'"'/tmp/pip-install-sz89ieuw/mmseg_86227a7da2734023a199ab7a10d06662/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-20_hddgd
         cwd: /tmp/pip-install-sz89ieuw/mmseg_86227a7da2734023a199ab7a10d06662/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-sz89ieuw/mmseg_86227a7da2734023a199ab7a10d06662/setup.py", line 6, in <module>
        reload(sys)
    NameError: name 'reload' is not defined
----------------------------------------
WARNING: Discarding http://pypi.doubanio.com/packages/c9/3a/a38acf3f3ae401082d74cd283d29a873dd3d1b77dc0c7fb28b80f0348073/mmseg-1.2.4.tar.gz#sha256=e7ba753b7bbefe54b4a7c2e27ed6714d1349e30ad6db9d7f67ce67b80b818f4c (from http://pypi.doubanio.com/simple/mmseg/). 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 mmseg
ERROR: No matching distribution found for mmseg

1 个答案:

答案 0 :(得分:0)

您可以尝试手动安装最新的软件包版本。类似的东西:

pip install mmseg==1.3.0