Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while installing mmseg #55

Closed
zhangrui-wolf opened this issue Jun 29, 2021 · 3 comments
Closed

Error while installing mmseg #55

zhangrui-wolf opened this issue Jun 29, 2021 · 3 comments

Comments

@zhangrui-wolf
Copy link

Installation commands:

$ conda create -n mim python=3.7 -y
$ conda activate mim
$ conda install pytorch=1.7.0 torchvision torchaudio cudatoolkit=11.0 -c pytorch
$ pip install openmim
$ mim install mmseg

Error message:

installing mmseg from wheel.
Collecting mmseg
  Using cached mmseg-1.3.0.tar.gz (817 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/wolf/Applications/anaconda3/envs/mim/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pzv486bm/mmseg_1a4e72c8212d4085bdb0f2778d4bd53a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pzv486bm/mmseg_1a4e72c8212d4085bdb0f2778d4bd53a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-fymx11nb
         cwd: /tmp/pip-install-pzv486bm/mmseg_1a4e72c8212d4085bdb0f2778d4bd53a/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-pzv486bm/mmseg_1a4e72c8212d4085bdb0f2778d4bd53a/setup.py", line 6, in <module>
        reload(sys)
    NameError: name 'reload' is not defined
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/f8/31/3bc9205f39cc8ab37193a6fbb24693993b2f305aba9f35b09fad882107ee/mmseg-1.3.0.tar.gz#sha256=f8878cddde0e96b7c70ff457edf662e6741716e71723a46a08b9efdcf9e3542d (from https://pypi.org/simple/mmseg/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached mmseg-1.2.4.tar.gz (1.6 MB)
    ERROR: Command errored out with exit status 1:
     command: /home/wolf/Applications/anaconda3/envs/mim/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pzv486bm/mmseg_63ef6e91598f462b8ec783045bc3f28b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pzv486bm/mmseg_63ef6e91598f462b8ec783045bc3f28b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-_uhoraow
         cwd: /tmp/pip-install-pzv486bm/mmseg_63ef6e91598f462b8ec783045bc3f28b/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-pzv486bm/mmseg_63ef6e91598f462b8ec783045bc3f28b/setup.py", line 3, in <module>
        reload(sys)
    NameError: name 'reload' is not defined
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c9/3a/a38acf3f3ae401082d74cd283d29a873dd3d1b77dc0c7fb28b80f0348073/mmseg-1.2.4.tar.gz#sha256=e7ba753b7bbefe54b4a7c2e27ed6714d1349e30ad6db9d7f67ce67b80b818f4c (from https://pypi.org/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 (from versions: 1.2.4, 1.3.0)
ERROR: No matching distribution found for mmseg
Traceback (most recent call last):
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/site-packages/mim/utils/utils.py", line 390, in call_command
    subprocess.check_call(cmd)
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', '-m', 'pip', '--default-timeout', '45', 'install', 'mmseg']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/wolf/Applications/anaconda3/envs/mim/bin/mim", line 8, in <module>
    sys.exit(cli())
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/site-packages/mim/commands/install.py", line 107, in cli
    is_editable=is_editable)
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/site-packages/mim/commands/install.py", line 210, in install
    is_user_dir)
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/site-packages/mim/commands/install.py", line 533, in install_from_wheel
    call_command(install_cmd)
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/site-packages/mim/utils/utils.py", line 392, in call_command
    raise highlighted_error(e)  # type: ignore
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/site-packages/mim/utils/utils.py", line 364, in highlighted_error
    return click.style(msg, fg='red', bold=True)  # type: ignore
  File "/home/wolf/Applications/anaconda3/envs/mim/lib/python3.7/site-packages/click/termui.py", line 519, in style
    return "".join(bits)
TypeError: sequence item 2: expected str instance, CalledProcessError found
@ZwwWayne
Copy link
Collaborator

ZwwWayne commented Jul 2, 2021

You should use mim install mmsegmentation

@junmeng6025
Copy link

pip install mmsegmentation works for me

@junmeng6025
Copy link

or try
pip install openmim
and then
mim install mmsegmentation

check this issue on stack-overflow: https://stackoverflow.com/questions/67666049/when-i-pip-install-mmseg-i-got-the-error-nameerror-name-reload-is-not-def

'reload()` is basically a Python2 issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants