Last active
April 6, 2018 09:12
-
-
Save lingyielia/3b236857e55edb32adfa518d5d698c1e to your computer and use it in GitHub Desktop.
Cheatsheet for create new virtualenv, install packages, add kernels to jupyter notebook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=================================== | |
#create env | |
conda create --name myenvname | |
#delete a env | |
conda env remove --name myenv | |
=================================== | |
#install package | |
conda install -n myenv scipy=0.15.0 | |
conda install -n myenv pip | |
#if inside the env, can use pip install | |
pip install -r requirements.txt #inside the env | |
pip install sklearn #inside the env | |
#enter the env | |
source activate myenv | |
#exit the env | |
source deactivate | |
==================================== | |
#add a new kernel (inside the env) | |
python -m ipykernel install --user --name myenv --display-name "Python (myenv)" | |
==================================== | |
#uninstall conda | |
conda install anaconda-clean #for complete uninstall | |
anaconda-clean --yes | |
rm -rf ~/anaconda2 | |
#remove backup | |
cd .anaconda_backup #in the root dir | |
rm -rf 2017-09-14T210109/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment