当前位置:网站首页>Conda 虚拟环境管理(创建、删除、克隆、重命名、导出和导入)
Conda 虚拟环境管理(创建、删除、克隆、重命名、导出和导入)
2022-04-23 05:43:00 【林仔520】
1. 创建环境、激活环境
# 创建环境 env_name
conda create -n env_name python=3.7 # env_name为你创建新环境的名称
# 激活环境
activate env_name
2. 删除环境
conda remove -n env_name --all # env_name为你要删除环境的名称
3. 复制(克隆)环境
conda create -n env2 --clone env1
4. 重命名环境
conda 其实没有重命名命令,实现重命名是通过 clone 完成的,具体过程如下所示
1.clone 一份 env_old 的环境为env_new
2.然后,删除env_old的环境
conda create -n env_new --clone env_old
conda remove -n env_old --all
5. 导出环境
anaconda env_name # envname为要导出的环境名称,导出时需要先切换至该环境
conda env export > environment.yaml
pip freeze > pip.txt
6. 导入环境
conda env create -f environment.yaml # 直接依据yaml文件创建环境并安装依赖包
pip install -r pip.txt # 用于pip导出的
conda install --y --file requirements.txt # 适用于numpy=1.19.1形式的
版权声明
本文为[林仔520]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_37955704/article/details/124329631
边栏推荐
- SQL statement simple optimization
- Data mining -- understanding data
- 2-軟件設計原則
- The 8th Blue Bridge Cup 2017 - frog jumping cup
- Strategy for improving the conversion rate of independent stations | recovering abandoned users
- Isosceles triangle - the 9th Lanqiao provincial competition - group C
- mysql如何将存储的秒转换为日期
- ‘EddiesObservations‘ object has no attribute ‘filled‘
- poi导出excel,行相同数据自动合并单元格
- Split and merge multiple one-dimensional arrays into two-dimensional arrays
猜你喜欢
基于ssm 包包商城系统
Pol / select / EPO
域内用户访问域外samba服务器用户名密码错误
Establish excel bookkeeping book through setting context menu
图解HashCode存在的意义
Radar equipment (greedy)
Pytorch deep learning practice_ 11 convolutional neural network
软件架构设计——软件架构风格
Getting started with JDBC \ getting a database connection \ using Preparedstatement
实操—Nacos安装与配置
随机推荐
MySQL的锁机制
建表到页面完整实例演示—联表查询
Typescript interface & type rough understanding
MySQL realizes master-slave replication / master-slave synchronization
[machine learning] scikit learn introduction
Batch import of orange single micro service
Hotkeys, interface visualization configuration (interface interaction)
Software architecture design - software architecture style
ES6之解构函数
Transposed convolution
mysql-触发器、存储过程、存储函数
Getting started with JDBC \ getting a database connection \ using Preparedstatement
Strategies to improve Facebook's touch rate and interaction rate | intelligent customer service helps you grasp users' hearts
No.1.#_ 6 Navicat shortcuts
Shell instruction learning 1
对象转map
SQL语句简单优化
框架解析1.系统架构简介
转置卷积(Transposed Convolution)
JVM family (4) -- memory overflow (OOM)