9

I'm using PyCharm with virtualenv.

Is there any method to force the activation of virtualenv, in terminal window of PyCharm, at startup of the application?

At this time, when I open PyCharm (with relative project) and the terminal window in it, I need to manual run the command (source /env/bin/activate) to enable the virtualenv on this terminal window of PyCharm.

Fabrizio A
  • 3,072
  • 5
  • 24
  • 35
  • If your default interpreter is your virtualenv interpreter, then it will be activated by default when you run a script through pycharm. – Games Brainiac Aug 01 '14 at 13:58
  • @GamesBrainiac my problem is little different. I wish to have the terminal window of PyCharm correct enabled with virtualenv. If I run some python command in terminal window of PyCharm it still refers to global python interpreter. – Fabrizio A Aug 01 '14 at 14:26
  • 1
    Well unfortunately, you're going to have this solve using bash scripts. Nothing in PyCharm to do this. – Games Brainiac Aug 01 '14 at 15:35
  • Related: [For the pycharm IDE how would I open a terminal in the IDE that uses an identical project environment](http://stackoverflow.com/q/24809181/95735) – Piotr Dobrogost Aug 04 '14 at 08:16

1 Answers1

4

You can find answer here

for Windows - Go to Settings, Terminal, Default shell and add /K <path-to-your-activate.bat>.

Community
  • 1
  • 1
Anton
  • 41
  • 3