先装了python3.9,然后装了anaconda3(里面带有python3.8),因为要复现一篇已经公开了数据集和程序的文献,而里面的包的版本太老,就卸载了3.9,但里面仍含有pytorch3.9的环境,,,,
1.查看anadconda安装的所有虚拟环境:
C:\Users\zr>conda info -e
# conda environments:
#
base * C:\Anaconda3
pytorch3.6 C:\Anaconda3\envs\pytorch3.6
pytorch3.9 C:\Anaconda3\envs\pytorch3.9
2.激活任一环境(两种指令),并查看python版本:
C:\Users\zr>activate base
(base) C:\Users\zr>python
Python 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
C:\Users\zr>conda.bat activate base
(base) C:\Users\zr>
退出python使用指令 exit()
3.退出当前环境:
(base) C:\Users\zr>conda.bat deactivate
C:\Users\zr>activate base
4.删除环境(两种方法):
(1)用指令删除:要在退出所有环境的状态下删除,即在一下状态:
C:\Users\zr>
然后使用指令:conda remove -n 环境名 --all
(2)直接删除文件:
文件所在路径:C:\Anaconda3\envs