question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

failed to install mmdet

See original GitHub issue

I am following GETTING_STARTED.md to install mmskeleton, but at the step of python setup.py develop --mmdet, it occurs an error:

(base) weidawang@weidawang-TUF-Gaming-FX506LU-FX506LU:~/Repo/mmskeleton$ python setup.py develop --mmdet
Using pip 20.2.4 from /home/weidawang/miniconda3/lib/python3.7/site-packages/pip (python 3.7)
Non-user install because site-packages writeable
Created temporary directory: /tmp/pip-ephem-wheel-cache-gc09riga
Created temporary directory: /tmp/pip-req-tracker-tnjqjm62
Initialized build tracking at /tmp/pip-req-tracker-tnjqjm62
Created build tracker: /tmp/pip-req-tracker-tnjqjm62
Entered build tracker: /tmp/pip-req-tracker-tnjqjm62
Created temporary directory: /tmp/pip-install-f9cdkufo
Collecting https://github.com/open-mmlab/mmdetection/archive/v1.0rc1.zip
  Created temporary directory: /tmp/pip-req-build-8dj5iaqy
  Created temporary directory: /tmp/pip-unpack-jzpzd8_k
  Looking up "https://github.com/open-mmlab/mmdetection/archive/v1.0rc1.zip" in the cache
  No cache entry available
  Starting new HTTPS connection (1): github.com:443
  https://github.com:443 "GET /open-mmlab/mmdetection/archive/v1.0rc1.zip HTTP/1.1" 302 None
  Status code 302 not in (200, 203, 300, 301)
  Looking up "https://codeload.github.com/open-mmlab/mmdetection/zip/v1.0rc1" in the cache
  Current age based on date: 440
  Starting new HTTPS connection (1): codeload.github.com:443
  https://codeload.github.com:443 "GET /open-mmlab/mmdetection/zip/v1.0rc1 HTTP/1.1" 304 0
  Using cached https://github.com/open-mmlab/mmdetection/archive/v1.0rc1.zip
  Added https://github.com/open-mmlab/mmdetection/archive/v1.0rc1.zip to build tracker '/tmp/pip-req-tracker-tnjqjm62'
    Running setup.py (path:/tmp/pip-req-build-8dj5iaqy/setup.py) egg_info for package from https://github.com/open-mmlab/mmdetection/archive/v1.0rc1.zip
    Created temporary directory: /tmp/pip-pip-egg-info-obi4acmj
    Running command python setup.py egg_info
    Error: mkl-service + Intel(R) MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp-7c85b1e2.so.1 library.
    	Try to import numpy first or set the threading layer accordingly. Set MKL_SERVICE_FORCE_INTEL to force it.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Exception information:
Traceback (most recent call last):
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 228, in _main
    status = self.run(options, args)
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 324, in run
    reqs, check_supported_wheels=not options.target_dir
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 340, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 483, in prepare_linked_requirement
    req, self.req_tracker, self.finder, self.build_isolation,
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 91, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/distributions/sdist.py", line 40, in prepare_distribution_metadata
    self.req.prepare_metadata()
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 555, in prepare_metadata
    self.metadata_directory = self._generate_metadata()
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 535, in _generate_metadata
    details=self.name or "from {}".format(self.link)
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/operations/build/metadata_legacy.py", line 73, in generate_metadata
    command_desc='python setup.py egg_info',
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 242, in call_subprocess
    raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Removed https://github.com/open-mmlab/mmdetection/archive/v1.0rc1.zip from build tracker '/tmp/pip-req-tracker-tnjqjm62'
Removed build tracker: '/tmp/pip-req-tracker-tnjqjm62'
Traceback (most recent call last):
  File "setup.py", line 149, in <module>
    subprocess.check_call([sys.executable, "-m", "pip", "install", 'https://github.com/open-mmlab/mmdetection/archive/v1.0rc1.zip', '-v'])
  File "/home/weidawang/miniconda3/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/weidawang/miniconda3/bin/python', '-m', 'pip', 'install', 'https://github.com/open-mmlab/mmdetection/archive/v1.0rc1.zip', '-v']' returned non-zero exit status 1.

Then i go to mmdetection official repo and successfully install mmdetecion-2.6.0 :

git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -r requirements/build.txt
python setup.py develop

I thought it would success, and i move on to next step python mmskl.py pose_demo, it occurs another error:

(base) weidawang@weidawang-TUF-Gaming-FX506LU-FX506LU:~/Repo/mmskeleton$ python mmskl.py pose_demo
/home/weidawang/miniconda3/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py:41: UserWarning: Cython.Distutils.old_build_ext does not properly handle dependencies and is deprecated.
  "Cython.Distutils.old_build_ext does not properly handle dependencies "
Load configuration information from ./configs/pose_estimation/pose_demo.yaml

Pose estimation:
Traceback (most recent call last):
  File "mmskl.py", line 123, in <module>
    main()
  File "mmskl.py", line 117, in main
    call_obj(**cfg.processor_cfg)
  File "/home/weidawang/Repo/mmskeleton/mmskeleton/utils/importer.py", line 24, in call_obj
    return import_obj(type)(**kwargs)
  File "/home/weidawang/Repo/mmskeleton/mmskeleton/processor/pose_demo.py", line 78, in inference
    model = init_pose_estimator(detection_cfg, estimation_cfg, device=0)
  File "/home/weidawang/Repo/mmskeleton/mmskeleton/apis/estimation.py", line 18, in init_pose_estimator
    detection_model = mmdet.apis.init_detector(detection_model_file,
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/lazy_import-0.2.2-py3.7.egg/lazy_import/__init__.py", line 156, in __getattribute__
    _load_module(self)
  File "/home/weidawang/miniconda3/lib/python3.7/site-packages/lazy_import-0.2.2-py3.7.egg/lazy_import/__init__.py", line 537, in _load_module
    msg.format(**modclass._lazy_import_error_strings)), None)
  File "<string>", line 3, in raise_from
ImportError: mmskeleton.utils.third_party attempted to use a functionality that requires module mmdet.apis, but it couldn't be loaded. Please install mmdet and retry.

Could anyone tell me how to solve it ? Thanks !

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
horizonlycommented, Nov 11, 2020

The problem is caused by mmcv version, only mmcv==0.4.3 can work, and when you try pip install mmcv==0.4.3, then you must try python setup.py develop and python setup.py develop --mmdet again

0reactions
jermycccommented, Apr 18, 2022

The problem is caused by mmcv version, only mmcv==0.4.3 can work, and when you try pip install mmcv==0.4.3, then you must try python setup.py develop and python setup.py develop --mmdet again

兄弟,按你的方法试了,怎么还是报这个错啊

so am I. could you find the solution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip3 install mmdet giving an error failed to build pycocotools
When installing OpenMMDetection toolbox, I try to install mmdet package but it gives the following erro. I installed VSC++ 14.20 and ...
Read more >
mmdet - PyPI
Introduction. MMDetection is an open source object detection toolbox based on PyTorch. It is a part of the OpenMMLab project.
Read more >
Prerequisites — MMDetection 2.18.0 documentation
Install MMDetection. You can simply install mmdetection with the following command: pip install mmdet. or clone the repository and then install ...
Read more >
error: failed building wheel for pycocotools failed to ... - You.com
On Windows 10, run "mim install mmdet": ERROR: Failed building wheel for pycocotools Failed to build pycocotools ERROR: Could not build wheels for ......
Read more >
Installation - IceVision
fast →pip install torch==1.10.0+cu102 torchvision==0.11.1+cu ... the large library of models available in mmdet , therefore we strongly recommend doing it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found