Last active
June 18, 2024 14:54
-
-
Save githubfoam/6239ce780e59d65f264e276ae11a56ae to your computer and use it in GitHub Desktop.
conda anaconda cheat sheet
This file contains hidden or 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
| --------------------------------------------------------------------------------------------- | |
| #Installing in silent mode | |
| wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh | |
| bash ~/miniconda.sh -b -p $HOME/miniconda | |
| --------------------------------------------------------------------------------------------- | |
| #anaconda cloud | |
| >anaconda login | |
| git clone https://github.com/Anaconda-Platform/anaconda-client | |
| cd anaconda-client/example-packages/conda/ | |
| conda install conda-build | |
| conda config --set anaconda_upload no | |
| "conda build ." | |
| >conda build . --output | |
| C:\ProgramData\Anaconda3\conda-bld\win-64\conda_gc_test-1.2.1-3.tar.bz2 | |
| >anaconda login | |
| >anaconda upload C:\ProgramData\Anaconda3\conda-bld\win-64\conda_gc_test-1.2.1-3.tar.bz2 | |
| anaconda upload my-notebook.ipynb #anaconda upload my-notebook.ipynb | |
| http://notebooks.anaconda.org/<USERNAME>/my-notebook #HTML version | |
| conda install -c username packagename #Downloading and installing a package from Cloud | |
| --------------------------------------------------------------------------------------------- | |
| #(base) environment | |
| #Anaconda Prompt as Administrator | |
| >conda update conda #update the package manager | |
| >conda --version | |
| conda update anaconda #update the meta-package | |
| conda update --all -y | |
| conda info | |
| >anaconda config --show #Listing all of your Client configuration variables | |
| >anaconda config --files #Listing all available Client configuration files | |
| --------------------------------------------------------------------------------------------- | |
| conda list anaconda$ #Anaconda version | |
| # Making the environment again from the yaml file, yaml file also contains the name of the environment | |
| conda env create --file environment.yaml | |
| conda env create --file environment.yml | |
| conda env create -n conda-env -f /path/to/environment.yml #recreate an environment | |
| conda env update -n conda-env -f /path/to/environment.yml #add the packages listed in an environment.yml file to an existing environment | |
| conda env list #List Virtual Environments | |
| conda env remove --name pybites #Remove Virtual Environment | |
| conda env export #Export Environment Configuration | |
| conda env export > environment.yml #Export Environment Configuration | |
| conda list --export > requirement.txt | |
| conda remove --name myenv --all | |
| conda env remove --name myenv | |
| conda search pytest #Search for Packages | |
| conda search -c conda-forge black #Search Alternate Channels specify different channels as well, with the use of the -c flag | |
| conda install -c r r-anomalydetection #Installing to the current environment | |
| conda install --name pybites beautifulsoup4 #Installing to not currently in the active environment | |
| conda install -c conda-forge black #Installing black from the conda-forge channel | |
| pip search black #Install Packages With Pip | |
| pip install black | |
| conda remove beautifulsoup4 black #Remove Packages | |
| conda create -n weatherforecast --file requirement.txt | |
| conda create --name pybites python=3.7 beautifulsoup4 requests pytest #Install Packages While Creating Environment | |
| conda create --name pybites python=3.7 | |
| conda activate pybites | |
| conda deactivate | |
| conda create --clone base --name ml #Clone An Environment | |
| conda config --add channels conda-forge #add a certain channel to the ones that are search by default | |
| # Anaconda Ubuntu 16.04 deployment | |
| wget https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh | |
| sha256sum Anaconda3-2018.12-Linux-x86_64.sh | |
| md5sum Anaconda3-2018.12-Linux-x86_64.sh | |
| copy the hash from the site | |
| echo "HASH GOES HERE" > hashcheck.txt | |
| sha256sum Anaconda3-2018.12-Linux-x86_64.sh | awk '{print $1;}' >> hashcheck.txt | |
| less hashcheck.txt | |
| cat hashcheck.txt | uniq | wc -l | |
| bash Anaconda3-2018.12-Linux-x86_64.sh | |
| source ~/.bashrc | |
| anaconda-navigator | |
| #Environments With R | |
| # All packages from the R channel are prefixed with “r-" | |
| conda install r-base #install the r-base package | |
| conda create -n r-env r-base #install the r-base package when first creating an environment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment