Conda cheat sheet¶. The 1MB pdf conda cheat sheet is a single page summary of all the most important information about using conda. Complete Conda Cheat Sheet 2020-2021 online with US Legal Forms. Easily fill out PDF blank, edit, and sign them. Save or instantly send your ready documents. CONDA CHEAT SHEET Take a conda test drive at bit.ly/tryconda For full documentation of any command, type the command followed by -help, such as conda create -help TIP: Anaconda Navigator is a point-and-click way to manage packages and environments with conda.
Conda is a powerful package manager and environment manager thatyou use with command line commands at the Anaconda Prompt for Windows,or in a terminal window for macOS or Linux.
This 20-minute guide to getting started with conda lets you try outthe major features of conda. You should understand how conda workswhen you finish this guide.
SEE ALSO: Getting started with Anaconda Navigator, agraphical user interface that lets you use conda in a web-like interfacewithout having to enter manual commands. Compare the Getting startedguides for each to see which program you prefer.
Before you start¶
You should have already installedAnaconda.
Contents¶
Starting conda on Windows, macOS, or Linux. 2 MINUTES
Managing conda. Verify that Anaconda is installed and check that conda is updated to the current version. 3 MINUTES
Managing environments. Create environments and move easily between them. 5 MINUTES
Managing Python. Create an environment that has a different version of Python. 5 MINUTES
Managing packages. Find packages available for you to install. Install packages. 5 MINUTES
TOTAL TIME: 20 MINUTES
Starting conda¶
Windows
From the Start menu, search for and open 'Anaconda Prompt.'
On Windows, all commands below are typed into the Anaconda Prompt window.
MacOS
Open Launchpad, then click the terminal icon.
On macOS, all commands below are typed into the terminal window.
Linux
Open a terminal window.
On Linux, all commands below are typed into the terminal window.
Managing conda¶
Verify that conda is installed and running on your system by typing:
Conda displays the number of the version that you have installed. You do notneed to navigate to the Anaconda directory.
EXAMPLE: conda4.7.12
Note
If you get an error message, make sure you closed and re-opened theterminal window after installing, or do it now. Then verify that you are loggedinto the same user account that you used to install Anaconda or Miniconda.
Update conda to the current version. Type the following:
Conda compares versions and then displays what is available to install.
If a newer version of conda is available, type y
to update:
Conda Cheat Sheet Kapeli
Tip
We recommend that you always keep conda updated to the latest version.
Managing environments¶
Conda allows you to create separate environments containing files, packages,and their dependencies that will not interact with other environments.
When you begin using conda, you already have a default environment namedbase
. You don't want to put programs into your base environment, though.Create separate environments to keep your programs isolated from each other.
Create a new environment and install a package in it.
We will name the environment
snowflakes
and install the packageBioPython. At the Anaconda Prompt or in your terminal window, typethe following:Conda checks to see what additional packages ('dependencies')BioPython will need, and asks if you want to proceed:
Type 'y' and press Enter to proceed.
To use, or 'activate' the new environment, type the following:
Windows:
condaactivatesnowflakes
macOS and Linux:
condaactivatesnowflakes
Note
condaactivate
only works on conda 4.6 and later versions.For conda versions prior to 4.6, type:
Windows:
activatesnowflakes
macOS and Linux:
sourceactivatesnowflakes
Now that you are in your
snowflakes
environment, any condacommands you type will go to that environment untilyou deactivate it.To see a list of all your environments, type:
A list of environments appears, similar to the following:
Tip
The active environment is the one with an asterisk (*).
Change your current environment back to the default (base):
condaactivate
Note
For versions prior to conda 4.6, use:
Tip
When the environment is deactivated, its name is nolonger shown in your prompt, and the asterisk (*) returns to base.To verify, you can repeat the
condainfo--envs
command.
Managing Python¶
When you create a new environment, conda installs the same Python version youused when you downloaded and installed Anaconda. If you want to use a differentversion of Python, for example Python 3.5, simply create a new environment andspecify the version of Python that you want.
Create a new environment named 'snakes' that contains Python 3.5:
When conda asks if you want to proceed, type 'y' and press Enter.
Activate the new environment:
Windows:
condaactivatesnakes
macOS and Linux:
condaactivatesnakes
Note
condaactivate
only works on conda 4.6 and later versions.For conda versions prior to 4.6, type:
Windows:
activatesnakes
macOS and Linux:
sourceactivatesnakes
Verify that the snakes environment has been added and is active:
Conda displays the list of all environments with an asterisk (*)after the name of the active environment:
The active environment is also displayed in front of your prompt in(parentheses) or [brackets] like this:
Verify which version of Python is in your currentenvironment:
Deactivate the snakes environment and return to base environment:
condaactivate
Note
For versions prior to conda 4.6, use:
Managing packages¶
Conda Cheat Sheets
In this section, you check which packages you have installed,check which are available and look for a specific package andinstall it.
To find a package you have already installed, first activate the environmentyou want to search. Look above for the commands toactivate your snakes environment.
Check to see if a package you have not installed named'beautifulsoup4' is available from the Anaconda repository(must be connected to the Internet):
Conda displays a list of all packages with that name on the Anacondarepository, so we know it is available.
Install this package into the current environment:
Check to see if the newly installed program is in this environment:
Anaconda Python Cheat Sheet
More information¶
Full documentation--- https://conda.io/docs/
Free community support--- https://groups.google.com/a/anaconda.com/forum/#!forum/anaconda
Paid support options--- https://www.anaconda.com/support/