Create a virtual environment as a ʻenvfolder in
project_folder. To make it easy to reproduce the sharing destination just by passing
project_folder`.
project_folder
(in Anaconda Prompt)cd project_folder
conda create --prefix ./env <Write the library you want to use here>
For example, if you want to create an environment with numpy
, matplotlib
installed
conda create --prefix ./env numpy matplotlib
When executed, a ʻenvfolder will be created in
project_folder. There is a virtual environment in this ʻenv
folder.
The advantage is that if you share the entire project_folder
, you can enable the same environment at the sharing destination.
conda env list
Check the environment list created in
conda activate <Path to the virtual environment you want to enable>
For example, if the confirmation result of the list is as follows
# conda environments:
#
C:\codes\Python\conda_tutorials\project_folder\env <-Created environment
To enable the environment
conda activate C:\codes\Python\conda_tutorials\project_folder\env
Recommended Posts