1

I created a new project in PyCharm and I made an environment file for the project. I want to use Jupyter Notebook with that project now and since Jupyter in PyCharm is not as great, I want to launch it from cmd. I am not able to figure out to activate the environment created in PyCharm from the command line. Can anyone help me with that?

2 Answers 2

2
  • find the location of environment from PyCharm's project's interpreter settings
  • From the terminal Run:

    source /path/to/env-activate
    
Sign up to request clarification or add additional context in comments.

2 Comments

I located the path for the environment. But when I run source path-to-env in cmd, I get an error which says 'source' is not recognized as an internal or external command, operable program or batch file.
I think I got it. I took a different approach. I found the activate.bat. I then dragged and dropped it in cmd and hit Enter. This worked and the environment changed.
0

Solution For Linux

try to use pyenv, once you install virtualenv with pyenv for example

cd ~/your_project_root_folder
pyenv install 3.6.1
pyenv virtualenv 3.6.1 your_venv_name
pyenv local your_venv_name

Then whatever shell command is launched (even from pyenv) you will have correct virtualenv and you don't need to change anything inside pycharm

PyENV

https://github.com/pyenv/pyenv-installer

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.