安装anaconda后,
环境变量添加
D:\Anaconda
D:\Anaconda\Scripts
D:\Anaconda\Library\mingw-w64\bin
D:\Anaconda\Library\usr\bin
D:\Anaconda\Library\bin
常用命令
conda info 查看当前环境的信息
conda info -e 查看已经创建的所有虚拟环境
conda activate xx 切换到xx虚拟环境
conda create -n xxx python=3.9 创建一个python3.9 名为xxx的虚拟环境。然后输入python 检查下是否为32位的python2.7版本,这样即创好了。
添加清华源
修改C盘用户.condarc文件如下:
channels:
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
添加后
(base) C:\Users\aikera>conda config --show channels
channels:
- ‘https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/’
- ‘https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/’
- defaults
- conda-forge
(有问题可以看这篇https://blog.csdn.net/chenhepg/article/details/113974497)
matlab指定python路径
pyenv('Version', 'D:\Anaconda3\python.exe');
pyversion
(
conda env list
pyenv('Version', 'C:\Users\admin\.conda\envs\python310\python.exe');
)
支持matlab支持python版本