Skip to content

Instantly share code, notes, and snippets.

@innat
Last active June 6, 2018 13:45
Show Gist options
  • Save innat/ecf250c2d49af73fdeb92982723d7016 to your computer and use it in GitHub Desktop.
Save innat/ecf250c2d49af73fdeb92982723d7016 to your computer and use it in GitHub Desktop.
Setting up anaconda environment and necessary packages

Open up the terminal and type following command

conda create -n <env_name> python=<version_no.>

To activate environment type following -

activate <env_name> [ for windows ] source activate <env_name> [ linux , Mac OS ]

and suppose you need following packages

numpy
matplotlib
pandas
seaborn
spyder
tensorflow
keras

We can install them manually one by one but to make it short just write them in a txt file like above and same it , for example : environment.txt . However, you can also give specific version of those packages like below

numpy==<version_no>
matplotlib==<version_no>
pandas==<version_no>
seaborn==<version_no>
spyder==<version_no>
tensorflow==<version_no>
keras==<version_no>

after that run following command -

pip install -r environment.txt

All the packages will install at a time.

To deactivate current environment , type following -

deactivate [ for windows ] source deactivate [ for linux and Mac OS ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment