anaconda虚拟环境中安装mmcv按照以前pip 直接安装的时候报错了,解决方法。
Collecting mmcv
Downloading http://pypi.doubanio.com/packages/20/24/18a1a702688ba311f57b00ff22e2194488bc36eb90ed80bb0adacfbc066f/mmcv-0.5.9.tar.gz (128 kB)
|████████████████████████████████| 128 kB 6.4 MB/s
ERROR: Command errored out with exit status 1:
command: 'd:\bashsoft\anaconda\envs\torch\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ty\\AppData\\Local\\Temp\\pip-install-xgs29701\\mmcv\\setup.py'"'"'; __file__='"'"'C:\\Users\\ty\\AppData\\Local\\Temp\\pip-install-xgs29701\\mmcv\\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 'C:\Users\ty\AppData\Local\Temp\pip-pip-egg-info-n4mk46on'
cwd: C:\Users\ty\AppData\Local\Temp\pip-install-xgs29701\mmcv\
Complete output (33 lines):
WARNING: The repository located at pypi.douban.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 pypi.douban.com'.
ERROR: Could not find a version that satisfies the requirement pytest-runner (from versions: none)
ERROR: No matching distribution found for pytest-runner
Traceback (most recent call last):
File "d:\bashsoft\anaconda\envs\torch\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "d:\bashsoft\anaconda\envs\torch\lib\subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['d:\\bashsoft\\anaconda\\envs\\torch\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\ty\\AppData\\Local\\Temp\\tmpx7bj00mz', '--quiet', 'pytest-runner']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ty\AppData\Local\Temp\pip-install-xgs29701\mmcv\setup.py", line 172, in <module>
zip_safe=False)
File "d:\bashsoft\anaconda\envs\torch\lib\site-packages\setuptools\__init__.py", line 160, in setup
_install_setup_requires(attrs)
File "d:\bashsoft\anaconda\envs\torch\lib\site-packages\setuptools\__init__.py", line 155, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "d:\bashsoft\anaconda\envs\torch\lib\site-packages\setuptools\dist.py", line 698, in fetch_build_eggs
replace_conflicting=True,
File "d:\bashsoft\anaconda\envs\torch\lib\site-packages\pkg_resources\__init__.py", line 783, in resolve
replace_conflicting=replace_conflicting
File "d:\bashsoft\anaconda\envs\torch\lib\site-packages\pkg_resources\__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "d:\bashsoft\anaconda\envs\torch\lib\site-packages\pkg_resources\__init__.py", line 1078, in obtain
return installer(requirement)
File "d:\bashsoft\anaconda\envs\torch\lib\site-packages\setuptools\dist.py", line 754, in fetch_build_egg
return fetch_build_egg(self, req)
File "d:\bashsoft\anaconda\envs\torch\lib\site-packages\setuptools\installer.py", line 130, in fetch_build_egg
raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['d:\\bashsoft\\anaconda\\envs\\torch\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\ty\\AppData\\Local\\Temp\\tmpx7bj00mz', '--quiet', 'pytest-runner']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
解决办法:
首先升级gcc: conda install -c daleydeng gcc-5
然后进入到"/home1/wang-internship-1/anaconda3/envs/dota/lib/"目录下
删除: libstdc++.so.6
创建超链接:ln -s libstdc++.so.6.0.26 libstdc++.so.6