Aakaash Jois
Aakaash Jois

Reputation: 288

Loading Python Virtualenv files created using PyCharm using command line

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?

Upvotes: 1

Views: 478

Answers (2)

5parkp1ug
5parkp1ug

Reputation: 532

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

    source /path/to/env-activate
    

Upvotes: 2

DmitrySemenov
DmitrySemenov

Reputation: 10365

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

Upvotes: 0

Related Questions