Conda Commands Cheat Sheet



some useful productivity tools¶¶
Conda commands cheat sheet freeSheetConda
  • code editor: sublime text: https://www.sublimetext.com/3
  • nicer command line tool for Windows: http://cmder.net/

Conda commands¶¶

Get your conda cheat sheet. With Miniconda you download only the packages you want with the conda command, 'conda install PACKAGENAME' BEFORE YOU START GET IT. CONDA CHEAT SHEET Command line package and environment manager Learn to use conda in 30 minutes at bit.ly/tryconda TIP: Anaconda Navigator is a graphical interface to use conda. Double-click the. Conda env create -f environment.yml Updating a conda env using a YAML file conda env update -file environment.yml Conclusion. And there you have it, most of the everyday conda env commands you will ever need. If you have any additional ones, feel free to add them in the comments. With Miniconda you install only the packages you want with the conda command, conda install PACKAGENAME Example: conda install anaconda-navigator BEFORE YOU START GET IT Included in Anaconda 4.4+, or get with 'conda install PACKAGENAME' 1. NumPy numpy.org N-dimensional array for numerical computation 2. SciPy scipy.org. Conda cheat sheet Setup a conda environment conda create -name cr python=3.8 numpy pandas scikit-learn matplotlib seaborn jupyter plotly Activate the environment.

What is conda?

  • Conda is a powerful environment and package manager.
  • Create multiple environments with different versions of Python with different sets of libraries
  • easily switch between environments
  • http://anaconda.org/ provides free hosting for Python libraries
  • conda helps to easily search for, install libraries and also to keep them up to date

Learn resources:

  • getting started: http://conda.pydata.org/docs/test-drive.html#managing-environments
  • reference doc: http://conda.pydata.org/docs/

List all environments¶¶

Run the above command in terminal

Create a new environment¶¶

Check if new folder was created in C:anaconda3envs

Advanced steps¶¶

Clone an existing environment¶¶

For instance, to clone the root environment:

But you would most likely want to clone the ArcGIS Pro’s Python environment so you can experiment without messing up the default one

Starting Jupyter notebook in a different directory¶¶

For the most part you can cd to desired directory after activating your environment and start the notebook. But if you cannot do it:

Exporting an environment to a file¶¶

It is useful to export your environment to a environment.yml file and include it in your repository. This allows replicating the project in a different computer by you or someone else.

This creates the .yml file with version number and source repo for all your packages. Thus, this file is specific for a particular OS and Python build version.

To create an agnostic file, use

This strips out the version numbers, enabling you to upgrade to newer versions of the packages.

Conda Commands Cheat Sheet Printable

Install from an environment file¶¶

Conda Install Commands

To create a new environment from this file, run