Issue
Every time I create a new Python environment through Anaconda, I have to install even the basic python libraries all the time. The numpy, pandas, matplotlib, etc. are such basic libraries that everyone needs them. Is there a sing;le command that can create the new environment whilst the mentioned libraries are pre-installed?
Solution
Easiest way is to use command :
conda create -n env_full anaconda
It will install all packages that Anaconda includes
Second option is just listing packages you want to preinstall when creating env eg:
conda create -n new_env python=3.11 pandas scipy matplotlib
Remember you can always choose what distribution of package will be installed, simply by adding version of package like:
conda create -n new_env python =3.11 pandas=1.5, scipy=1.9.3
Adttionaly you can paste file with packages you want to be downloaded when creating new env with method:
--file 'dir to text file with packages'
You can read about options of cretaing envs in official docs: https://docs.conda.io/projects/conda/en/latest/commands/create.html
Edit: Quick follow to my answer as bets practice sharing - I higly recomend cretaing file with packages you always use in your enviroment and just pass them with --file command when creating enviroment -> saves a lot of time :)
Answered By - jeste_artyste
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.