pip install -e. 子线程异常退出 setuptools报错
在使用pip install -e. 创建项目时,遇到了
- ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
- ERROR: No matching distribution found for setuptools>=40.8.0
详细错误如下图
错误原因:缺少了两个依赖的库
解决方法
pip install pyinstaller
pip install wheel
再进行项目初始化就成功了
注:mmdetection项目环境搭建,参考MMDetection环境配置。这篇文章在后面环境收集打印的时候把mmengine写错了,正确的代码如下
from mmengine.utils import get_git_hash
from mmengine.utils.dl_utils import collect_env as collect_base_env
import mmdet
def collect_env():
"""Collect the information of the running environments."""
env_info = collect_base_env()
env_info['MMDetection'] = f'{mmdet.__version__}+{get_git_hash()[:7]}'
return env_info
if __name__ == '__main__':
for name, val in collect_env().items():
print(f'{name}: {val}')