I want to manage Python packages and more! I want to create a virtual environment with conda! I want to reproduce the created environment on a new PC!
For those who say, and as a memorandum of my own, I have summarized the commands of conda. There are various other commands, but I'm collecting only those that are likely to be used.
I haven't explained the commands in detail, so what is conda delicious? If so, you may want to look for a tutorial-like article once. I would be happy if you could use it for cheat sheet purposes.
Also, as a flow to use conda
--List display -(Create virtual environment) --Enter the environment --Package management -(Output a list for environment reproduction) --Get out of the environment -(Delete environment)
I think it will be a flow like that, so I wrote it with that flow in mind.
conda info -e
--Display the package list of the current conda environment
conda list
--Display the package list of the specified conda environment
conda list -n py38
--Created by specifying the python version
conda create --name py38 python=3.8
conda create -n py38 python=3.8
--Copy and create virtual environment
Example: Copy base to make py38
conda create -n py38 --clone base
--Rebuild the environment from the list for environment reproduction
conda create -n py38 --file package-list.txt
conda activate py38
conda search tensorflow
--Installation
conda install tensorflow
--Install by specifying the version
conda install tensorflow=1.15
--Updating the package
conda update tensorflow
--All packages are up to date
conda update --all
conda remove tensorflow
conda list --export > package-list.txt
conda deactivate
conda remove -n py38 --all
https://qiita.com/yasushi-jp/items/7ce0975db7a7e9ac7991 https://qiita.com/WestRiver/items/cce9c99076d59abd3f69
Recommended Posts