当前位置:网站首页>conda命令
conda命令
2022-04-22 05:37:00 【哈!小白要成长!】
基本命令
# 查看信息
conda info
# 创建虚拟环境
conda create -n [虚拟环境名称]
# 创建虚拟环境时安装python指定环境
conda create -n [虚拟环境名称] python=3.6.5
# 创建虚拟环境时安装python环境和相应的包
conda create -n [虚拟环境名称] python=3.6.5 pandas
# 显示所有的环境
conda env list
# 进入指定的环境
activate [虚拟环境名称]
conda activate [虚拟环境名称]
# 退出当前环境
deactivate [虚拟环境名称]
conda deactivate
# 删除指定的环境
conda env remove -n [虚拟环境名称]
# 导出当前环境的package信息
conda env export > environment.yaml
# 导入他人的开发环境
conda env create -f environment.yaml

重命名虚拟环境
conda 其实没有重命名指令,实现重命名是通过 clone 完成的,分两步
(1)先clone
(2)再删除原来的虚拟环境
比如,想把环境 west_envname 重命名成 tf
第1步:
conda create -n tf --clone west_envname
第2步:
conda remove -n west_envname --all
镜像
1、pip配置国内多镜像源
pip.ini文件在windows10路径:C:\Users\west\AppData\Roaming\pip\pip.ini
[global]
timeout=60
index-url=http://pypi.douban.com/simple
extra-index-url=http://mirrors.aliyun.com/pypi/simple/
https://pypi.tuna.tsinghua.edu.cn/simple/
http://pypi.mirrors.ustc.edu.cn/simple/
[install]
trusted-host=pypi.douban.com
mirrors.aliyun.com
pypi.tuna.tsinghua.edu.cn
pypi.mirrors.ustc.edu.cn
[freeze]
timeout = 10
2、conda配置国内镜像源
.condarc文件在windows10路径:C:\Users\Administrator\ .condarc
# 清华源
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- defaults
show_channel_urls: true
ssl_verify: true
# 阿里源
channels:
- r
- bioconda
- conda-forge
- defaults
show_channel_urls: true
default_channels:
- http://mirrors.aliyun.com/anaconda/pkgs/main
- http://mirrors.aliyun.com/anaconda/pkgs/r
- http://mirrors.aliyun.com/anaconda/pkgs/msys2
custom_channels:
conda-forge: http://mirrors.aliyun.com/anaconda/cloud
msys2: http://mirrors.aliyun.com/anaconda/cloud
bioconda: http://mirrors.aliyun.com/anaconda/cloud
menpo: http://mirrors.aliyun.com/anaconda/cloud
pytorch: http://mirrors.aliyun.com/anaconda/cloud
simpleitk: http://mirrors.aliyun.com/anaconda/cloud
版权声明
本文为[哈!小白要成长!]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_41956139/article/details/123279912
边栏推荐
- How to use on duplicate key update in MySQL
- 3.连续整数Consecutive Integer
- raspberry keras-ocr can‘t allocate memory in static TLS block
- LeetCode 514. 自由之路--动态规划
- 导弹拦截问题(dp,dilworth定理)
- LeetCode 486. 预测赢家--动态规划+博弈论
- torch 循环神经网络torch.nn.RNN()和 torch.nn.RNNCell()
- Force buckle 237 Delete specified node list
- IDEA的安裝与使用技巧
- MySQL偶尔的卡顿
猜你喜欢

Data mining -- decision tree classification

vs 断点无法调试 The breakpoint will not currently be hit. No symbols have been loaded for this document.

数据挖掘——决策树分类

Common methods of arrays (super detailed explanation)

数据挖掘——逻辑回归

raspberry keras-ocr can‘t allocate memory in static TLS block

《PyTorch深度学习实践》Lecture_11 卷积神经网络进阶 Convolutional Neural Network

How to use on duplicate key update in MySQL

数位dp(模板)

Data mining clustering
随机推荐
线程池的几个常识
LeetCode 486. 预测赢家--动态规划+博弈论
TensorFlow
mysql建表最佳实践
01背包问题(模板)
stl alloc 空间分配器 代码解析
工作中如何成长
简单dp问题-母牛繁殖和超级爬楼梯
codeforces div2 777 A
记录一次项目经历和项目中遇到的技术
Redis缓存负载均衡使用的一致性哈希算法
生成excel模板(下拉选、多级联动)
供应链服务术语
@PostConstruct方法内部死循环引起的问题
Collections多个参数排序
MySQL偶尔的卡顿
torch使用踩坑日记,矩阵加速运算
Program compilation (preprocessing operation) + link
数据库迁移遇到的问题和解决方案
"Huawei Cup" programming competition for freshmen of Wuhan University J. hearsay file