当前位置:网站首页>Anaconda virtual environment migration
Anaconda virtual environment migration
2022-08-03 19:41:00 【ChaoFeiLi】
Because the lab has several servers at the same time, it is necessary to configure the same virtual environment without the server, so the migration of the virtual environment is considered, which is absolutely successful.
Reference link: On different Ubuntu servers, Anaconda's python virtual environment migration_qq_34292087's blog - CSDN blog

Premise introduction
Ubuntu18.04
anaconda3.5
Migration target: python3.6 (ie env1 in the above figure)
anaconda can manage multiple virtual environments, in the anaconda/envs directoryDown.If on server 1, we have 5 python environments (as shown above), we now need to copy env1 to the new server 2
Migration process
1. Copy anaconda/envs/env1 on server 1 to anaconda/envs on server 2
My environment name here is: Third
cd ~/anaconda3/envsscp -r [email protected] server IP:~/anaconda3/envs/Third ./2. Modify the pip file.The specific path of pip: ~/anaconda3/envs/env1/bin/pip or pip3 (preferably change both)
The absolute path of python in the first line needs to be modified correctly!!!(Otherwise pip install will report an error)
#!/home/lcf/anaconda3/envs/Third/bin/python# -*- coding: utf-8 -*-import reimport sysfrom pip._internal.cli.main import mainif __name__ == '__main__':sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])sys.exit(main())Change the "#!/home/lcf/anaconda3/envs/Third/bin/python" in the first line to the path of the destination environment
strong>边栏推荐
- Internet Download Manager简介及下载安装包,IDM序列号注册问题解决方法
- 高效目标检测:动态候选较大程度提升检测精度(附论文下载)
- 系统太多,多账号互通如何实现?
- 演讲议题及嘉宾重磅揭晓,TDengine 开发者大会推动数据技术“破局”
- Postgresql-xl global snapshot and GTM code walking (branch line)
- 网络协议-TCP、UDP区别及TCP三次握手、四次挥手
- if/else或switch替换为Enum
- 分享即时通讯开发之WebSocket:概念、原理、易错常识、动手实践
- 微导纳米IPO过会:年营收4.28亿 君联与高瓴是股东
- 建模该从哪一步开始?给你分析,给零基础的你一些学习建议
猜你喜欢
随机推荐
Line the last time the JVM FullGC make didn't sleep all night, collapse
友宏医疗与Actxa签署Pre-M Diabetes TM 战略合作协议
读取 resources 目录下的文件路径的九种方式,你知道多少?
高效目标检测:动态候选较大程度提升检测精度(附论文下载)
揭秘5名运维如何轻松管理数亿级流量系统
ScrollView嵌套RV,滑动有阻力不顺滑怎么办?
Introduction to Cosine Distance
盲僧发现了华点——教你如何使用API接口获取数据
阿里巴巴政委体系-第八章、阿里政委工作方法论
Radondb mysql installation problems
群辉查看硬盘存储占用的方式
入门3D建模基础教程详细分解
Postgresql源码(64)查询执行——子模块Executor(2)执行前的数据结构和执行过程
Postgresql-xl全局快照与GTM代码走读(支线)
盘点在线帮助中心对企业能够起到的作用
1161 最大层内元素和——Leetcode天天刷【BFS】(2022.7.31)
ECCV 2022 Oral | 满分论文!视频实例分割新SOTA: IDOL
「游戏建模干货」建模大师几步操作,学习经典,赶紧脑补一下吧
Postgresql source code (64) Query execution - data structure and execution process before submodule Executor (2) execution
云图说丨初识华为云微服务引擎CSE








