mim icon indicating copy to clipboard operation
mim copied to clipboard

[Bug] Cannot install mmcls requirements after installing mmdet.

Open HAOCHENYE opened this issue 2 years ago • 1 comments

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. I have read the FAQ documentation but cannot get the expected help.
  3. The bug has not been fixed in the latest version.

Describe the bug

(pytorch110cu111) [root@iZuf602264ukmv152q0po9Z mmclassification]# mim install -r requirements/runtime.txt 
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
Looking in links: https://download.openmmlab.com/mmcv/dist/cu111/torch1.10.0/index.html
Requirement already satisfied: matplotlib in /root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages (from -r requirements/runtime.txt (line 1)) (3.5.2)
Requirement already satisfied: numpy in /root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages (from -r requirements/runtime.txt (line 2)) (1.23.1)
Requirement already satisfied: packaging in /root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages (from -r requirements/runtime.txt (line 3)) (21.3)
Requirement already satisfied: python-dateutil>=2.7 in /root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages (from matplotlib->-r requirements/runtime.txt (line 1)) (2.8.2)
Requirement already satisfied: kiwisolver>=1.0.1 in /root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages (from matplotlib->-r requirements/runtime.txt (line 1)) (1.4.4)
Requirement already satisfied: pyparsing>=2.2.1 in /root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages (from matplotlib->-r requirements/runtime.txt (line 1)) (3.0.9)
Requirement already satisfied: pillow>=6.2.0 in /root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages (from matplotlib->-r requirements/runtime.txt (line 1)) (9.2.0)
Requirement already satisfied: cycler>=0.10 in /root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages (from matplotlib->-r requirements/runtime.txt (line 1)) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in /root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages (from matplotlib->-r requirements/runtime.txt (line 1)) (4.34.4)
Requirement already satisfied: six>=1.5 in /root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib->-r requirements/runtime.txt (line 1)) (1.16.0)
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
WARNING: The repository located at mirrors.cloud.aliyuncs.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.cloud.aliyuncs.com'.
ERROR: Could not find a version that satisfies the requirement mmdet==2.25.0 (from versions: none)
ERROR: No matching distribution found for mmdet==2.25.0
pip download failed with args: ['mmdet==2.25.0', '-d', '/tmp/tmpe6838qar', '--no-deps', '--no-binary', ':all:']
ERROR: Exception:
Traceback (most recent call last):
  File "/root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
    status = run_func(*args)
  File "/root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "/root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 399, in run
    conflicts = self._determine_conflicts(to_install)
  File "/root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 531, in _determine_conflicts
    return check_install_conflicts(to_install)
  File "/root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages/pip/_internal/operations/check.py", line 101, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
  File "/root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages/pip/_internal/operations/check.py", line 42, in create_package_set_from_installed
    dependencies = list(dist.iter_dependencies())
  File "/root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages/pip/_internal/metadata/pkg_resources.py", line 200, in iter_dependencies
    return self._dist.requires(extras)
  File "/root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages/mim/commands/install.py", line 169, in patched_requires
    mmdeps_text = get_mmdeps_from_mmpkg(self.project_name,
  File "/root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages/mim/commands/install.py", line 283, in get_mmdeps_from_mmpkg
    mminstall_content = get_mminstall_from_pypi(mmpkg, index_url=index_url)
  File "/root/miniconda3/envs/pytorch110cu111/lib/python3.8/site-packages/mim/commands/install.py", line 313, in get_mminstall_from_pypi
    exit(status_code)
  File "/root/miniconda3/envs/pytorch110cu111/lib/python3.8/_sitebuiltins.py", line 26, in __call__
    raise SystemExit(code)
SystemExit: 1
(pytorch110cu111) [root@iZuf602264ukmv152q0po9Z mmclassification]# pip install -r requirements
ERROR: Could not open requirements file: [Errno 21] 是一个目录: 'requirements'

Reproduction

  1. What command or script did you run?
A placeholder for the command.
  1. Did you make any modifications on the code or config? Did you understand what you have modified?
  2. What dataset did you use?

Environment

  1. Please run python mmdet/utils/collect_env.py to collect necessary environment information and paste it here.
  2. You may add addition that may be helpful for locating the problem, such as
    • How you installed PyTorch [e.g., pip, conda, source]
    • Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)

Error traceback If applicable, paste the error trackback here.

A placeholder for trackback.

Bug fix If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

HAOCHENYE avatar Aug 03 '22 03:08 HAOCHENYE

WARNING: The repository located at mirrors.cloud.aliyuncs.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.cloud.aliyuncs.com'.

We should catch the pip download error and give a warning instead.

ice-tong avatar Aug 03 '22 03:08 ice-tong