5

使用Conda或Docker创建多版本Python环境

 2 years ago
source link: https://allenwind.github.io/blog/9754/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Mr.Feng Blog

NLP、深度学习、机器学习、Python、Go

使用Conda或Docker创建多版本Python环境

使用Conda创建多版本Python环境

$ conda create -y --prefix python3 --file requirements.txt --copy --no-default-packages python=3.6

如果你不想安装conda到本地,那么可以使用Docker,首先把conda/miniconda3取到本地,

docker pull conda/miniconda3

然后执行类似如下命令,

sudo docker run --rm -v $(shell pwd):/workspace conda/miniconda3 \
conda create -y --prefix /workspace/python3 --file /workspace/requirements.txt --copy --no-default-packages python=3.6

不过要解决pip源的问题。除了conda,还有pipenv、virtualenv可以选择。

转载请包括本文地址:https://allenwind.github.io/blog/9754/
更多文章请参考:https://allenwind.github.io/blog/archives/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK