some useful productivity tools

Conda commands

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
  • provides free hosting for Python libraries
  • conda helps to easily search for, install libraries and also to keep them up to date

Learn resources:

List all environments

conda env list

Run the above command in terminal

Create a new environment

conda create --name <name_of_env> package=version

conda create --name devsummit_precon python=3.6

conda create --name data_sci_proj scipy pandas

Check if new folder was created in C:\anaconda3\envs

Activating environemnts

activate pro_devsummit_handson

search packages

conda search <package name>
conda search --channel <channel name> <package name>

conda search beautifulsoup

get info about a package

conda info <package name> ## gives you all dependencies
conda info --channel esri arcgis

Install packages

conda install <package name>

conda install pandas
conda install requests

conda instal --channel <channel_name> <package name>
conda install --channel esri arcgis
conda install -c esri arcgis

List all packages in current active environment

conda list
conda list nb*   # wild card search

Remove a package

conda remove <package name>

Remove an environment

conda env remove --name <name of env>
conda env remove --name devsummit_precon

Advanced steps

Clone an existing environment

For instance, to clone the root environment:

conda create --name clone_of_root --clone root

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

conda create --name propy_clone --clone arcgispro-py3

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:

jupyter-notebook --notebook-dir=D:\code\my_notebooks