Skip to content

Instantly share code, notes, and snippets.

@jhordyess
Last active March 6, 2022 22:52
Show Gist options
  • Save jhordyess/51b55805a4722839374d57968fedc532 to your computer and use it in GitHub Desktop.
Save jhordyess/51b55805a4722839374d57968fedc532 to your computer and use it in GitHub Desktop.
useful Conda commands
# After installation, to enable the use of conda commands with bash:
conda init bash #you need to close and reopen terminal afterwards
# Create the "env1" environment with python 3.7
conda create --name env1 python=3.7 -y
# Install 3 basic packages for VSCode in the "env1" environment
conda install --name env1 notebook ipykernel autopep8
# Change to use conda commands in the "env1" environment
conda activate env1
# Find the "ipykernel" package
conda search ipykernel
# Export the environment "env1" to a file called "environment.yml"
conda env export --name env1 > environment.yml
# Create environment from the above file
conda env create -f environment.yml
# List environments
conda info --envs
# 👉 https://docs.conda.io/projects/conda/en/latest/commands.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment