Skip to content

Instantly share code, notes, and snippets.

@alceufc
Last active June 8, 2018 14:05
Show Gist options
  • Save alceufc/58233a5f3bcb38ff7d6dd655320a32d1 to your computer and use it in GitHub Desktop.
Save alceufc/58233a5f3bcb38ff7d6dd655320a32d1 to your computer and use it in GitHub Desktop.
How to configure a conda environment in Window from a requirements.txt file.

Configuring Conda Environment in Windows

To create the enviroment run on the Anaconda Prompt:

conda create -n [ENVNAME] python=3.6

Activate the enviroment:

activate [ENVNAME]

Go to the directory of the project and run the following command to install the requirements (packages) for the project:

pip install -r requirements.txt

In order to be able to select which kernel we want in Jupyter, we have to install the package ipykernel:

conda install ipykernel

In order to use this enviroment with Jupyter, you have to run the following command:

python -m ipykernel install --user --name [ENVNAME] --display-name "Python ([ENVNAME])"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment