问题: clone conda环境时,pip命令无法使用。报错信息如下: (ms) root@localhost:/home# pip list Traceback (most recent call last): File "/home/miniconda3/envs/ms/bin/pip", line 7, in from pip._internal import main File "/home/miniconda3/envs/ms/lib/python3.7/site-packages/pip/_internal/__init__.py", line 42, in from pip._internal import cmdoptions File "/home/miniconda3/envs/ms/lib/python3.7/site-packages/pip/_internal/cmdoptions.py", line 16, in from pip._internal.index import ( ImportError: cannot import name 'FormatControl' from 'pip._internal.index' (/home/miniconda3/envs/ms/lib/python3.7/site-packages/pip/_internal/index/__init__.py) 原因: 源conda环境存在两个pip,clone的是10.0.1版本。 (ms) root@localhost:/home# conda list|grep pip pip 10.0.1 py37_0 c4aarch64 pip 20.1.1 解决方法: source /home/miniconda3/bin/activate ci conda install pip==20.1.1 conda create -n ms --clone ci