创建和删除环境
conda创建环境
1
| conda create -n env_name python=3.10
|
conda删除环境
1
| conda remove -n env_name --all
|
pip版本太低
有时候用pip安装包的时候会提示你pip版本太低,用python -m pip install --upgrade pip命令来更新pip即可
这里我的版本已经是最新的了,所以运行上述命令并没有更新
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| (pytorch2.0) harry@harrydeMBP test % pip show pip Name: pip Version: 23.1.2 Summary: The PyPA recommended tool for installing Python packages. Home-page: https://pip.pypa.io/ Author: The pip developers Author-email: distutils-sig@python.org License: MIT Location: /Users/harry/miniconda3/envs/pytorch2.0/lib/python3.10/site-packages Requires: Required-by: (pytorch2.0) harry@harrydeMBP test % python -m pip install --upgrade pip Requirement already satisfied: pip in /Users/harry/miniconda3/envs/pytorch2.0/lib/python3.10/site-packages (23.1.2) (pytorch2.0) harry@harrydeMBP test %
|