Unable to start virtual environment (virtualenv) in wsl in integrated terminal

I am running Ubuntu in wsl on windows.
From the terminal settings, I configured terminal to use wsl.exe instead of cmd.exe
My problem is that pycharm doesn't automatically start my virtual environment in the terminal when I open it. I have to manually go to the location and manually start using source.
I have already configured the environment in Project Settings -> Interpreter.
The python console (django console) is working properly in the venv, but the integrated terminal is not

How do I configure the integrated terminal to automatically start with the virtual environment (like it does in normal linux distributions) 

Comment actions Permalink


Are you using virtualenv inside WSL? Please provide more information regarding your project interpreter configuration, preferably with screenshots. I'm interested how exactly it is configured and where your virtual environment directory is located.


Comment actions Permalink

Yes. I am using virtualenv inside wsl. Here are some screenshots

1. Tjis is how I have setup my python interpreter

2. This is how I setup integrated terminal to use wsl instead of cmd. Also I have enabled "Activate virtualenv option"


3. But when I start the terminal, it does not start with the environment. I have to manually start it


4. When I open django console, I get this weird error

However the django shell is working properly without issues.

I dont get these problems when I using a linux machine directly.
They seem to come up only on wsl

Comment actions Permalink

Hey, I was ablet to get my virtual env started automatically by using this path for my terminal instead - C:\Windows\System32\bash.exe


Please sign in to leave a comment.