Anaconda environment construction memo

Thing you want to do

(In conda environment) The base environment uses python3.8, but as of 2020/09/22, tensorflow does not support python3.8. Therefore

--Create an environment called py37 for python3.7 --Since it is troublesome to reinstall all the packages, take over from base or something (this time take over from data analysis environment ds)

I want to do something like that.

First of all

conda create -n py37 python=3.7

Now you can create an environment called py37 for python3.7

Next, I want to put the packages used in ds in this environment. First, output the ds package list as txt.

conda list --explicit > ds.txt

ds.txt is created in the current working directory.

Important here

Since ds used python3.8, there is a place to install python3.8 in ds.txt. Specifically, the following line

https://repo.anaconda.com/pkgs/main/win-64/python-3.8.5-h5fd99cc_1.conda

Open ds.txt with an editor or something and delete this line.

Finally

Reflect the contents of ds.txt in py37.

conda activate py37

After activating py37 with

conda update --file ds.txt

With this, the newly created py37 will inherit the ds environment other than the python version.

Supplement

https://repo.anaconda.com/pkgs/main/win-64/python-3.8.5-h5fd99cc_1.conda

If this sentence is properly removed from ds.txt

conda create -n py37 python=3.7 --file ds.txt

So, I think I can create and take over the environment, but I haven't tried it.

It's a fairly manual approach, so please comment if there's an easier way to do it.

Recommended Posts

Anaconda environment construction memo
Anaconda3 × Pycharm environment construction memo
ConoHa environment construction memo
BigGorilla environment construction memo
Python + Anaconda + Pycharm environment construction
Anaconda environment construction on CentOS7
[Memo] Construction of cygwin environment
Anaconda3 python environment construction procedure
[MEMO] [Development environment construction] Python
[MEMO] [Development environment construction] wine
Python environment construction memo on Windows 10
Python environment construction memo on Mac
Python environment construction (pyenv, anaconda, tensorflow)
Environment construction memo of pyenv + conda
[MEMO] [Development environment construction] Jupyter Notebook
Emacs Python development environment construction memo
Ubuntu Desktop 20.04 development environment construction memo
Python3.6 environment construction (using Win environment Anaconda)
Django environment construction
Emacs-based environment construction
Linux environment construction
Python environment construction
django environment construction
CodeIgniter environment construction
python environment construction
Python --Environment construction
Python environment construction
OpenLDAP construction memo
Golang environment construction
python environment construction
Word2vec environment construction
Python (anaconda) development environment construction procedure (SpringToolsSuites) _2020.4
Vue.js + Flask environment construction memorandum ~ with Anaconda3 ~
A memo packed with RADEX environment construction
MacOS 10.11 environment construction: Powerline with Anaconda and Dein.vim
Django project environment construction
python windows environment construction
Python environment construction (Anaconda + VSCode) @ Windows10 [January 2020 version]
Go language environment construction
homebrew python environment construction
PyData related environment construction
Anaconda-4.2.0-python3 environment construction (Mac)
Python development environment construction
[0] TensorFlow-GPU environment construction built with Anaconda on Ubuntu
[Memo] Build a virtual environment with Pyenv + anaconda
YOLO v4 environment construction ①
pyenv + fish environment construction
python2.7 development environment construction
Anaconda3 environment installation procedure
Golang environment construction [goenv]
Mac environment construction Python
From Python environment construction to virtual environment construction with anaconda
Pyxel environment construction (Mac)
[Memo] Django development environment
Python environment construction @ Win7
[Environment construction] @anaconda that runs keras / tensorflow on GPU
About Linux environment construction (CentOS)
Use Anaconda in pyenv environment
PyTorch C ++ (LibTorch) environment construction
Introduced Tensorflow (Win / Anaconda environment)
Build an Anaconda virtual environment