虚拟环境就是借助虚拟机docker来把一部分内容独立出来,我们把这部分独立出来的东西称作“容器”,在这个容器中,我们可以只安装我们需要的依赖包,各个容器之间互相隔离,互不影响。
可能出错的情况:
An unexpected error has occurred. Conda has prepared the above report.If submitted, this report will be used by core maintainers to improve future releases of conda.Would you like conda to send this report to the core maintainers?使用conda clean -i ,然后再重新尝试
同时也可以复制现有环境
conda create -n your_env_name --clone clone_name 激活虚拟环境 activate your_env_name 对虚拟环境安装包 conda install -n your_env_name package_name 关闭虚拟环境(回到默认环境) deactivate env_name 删除虚拟环境 conda remove -n your_env_name --all 删除虚拟环境中的某个包 conda remove --name $your_env_name $package_namepytcharm切换conda虚拟环境,请点这里
查看conda配置(channels为镜像源) conda config --show 净化包(删除没有使用的包) conda clean -p 删除旧镜像源 conda config --remove channels xxx 换回默认源 conda config --remove-key channels