Created
November 16, 2018 01:18
-
-
Save naranjja/fe88be1efd3ce5dfbb51f55f8aca1292 to your computer and use it in GitHub Desktop.
Use Virtualenv within Jupyter Notebook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install virtualenv | |
pip3 install virtualenv | |
# Go to project folder | |
cd path/to/project-name | |
# Create environment 'env' | |
virtualenv env | |
# Activate environment | |
source env/bin/activate | |
# Install ipykernel | |
(env) pip3 install ipykernel | |
# Create new kernel for environment 'env' | |
(env) ipython kernel install --user --name=project-name | |
# Start Jupyter Notebook | |
jupyter notebook | |
# Once started, choose the 'project-name- kernel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment