franciscorubin/vscode-ipython

ipython console opens in system default env instead of selected virtualenv

Opened this issue · 1 comments

I'm currently running in a python 3.6.5 virtualenv. When I run 'Send File Contents to IPython', it instead opens an IPython console in OSX system default python 2.7.15. Is there a way to configure so that it will send to an IPython console installed in the current running virtualenv?

image

I have already changed settings so that python.pythonPath is set to the selected virtualenv ~/.virtualenvs/p36/bin/python. Running lines with the standard cmd + enter correctly runs the selected code in a vanilla python console in the appropriate virtualenv.

image

Please let know if there's a workaround for this, and thanks for the extension.

I have found the reason, it's because the conda envrionment can not be changed on powershell, you can just type conda init in powershell, then the selected virtual envrionment can be activated and the ipython can be run in the selected environment.