I'm trying to setup Pycharm to properly work with Docker. Right now I'm dealing with the remote python interpreter from inside a container.
Using SSH to access the remote interpreter, Pycharm is able to read the packages:
If I configure it to work with docker-compose instead, it detects a python interpreter, but is unable to read which libraries are installed:
Here are the configurations I'm using:
As I've finally realized, when Pycharm uses the SSH connection it doesn't get access to the environment variables, not to the ones defined in the docker-compose.yml.
To solve this you can either use the docker-compose remote interpreter instead of SSH or set the environment variables in "Edit Run/Debug Configurations" in Pycharm.