Pycharm can't find python path for dockers interpreters
Trying to run and debug a Fastapi project under a docker-compose file.
Using a docker compose interpreter:
- the first step works (docker is connected, docker-compose file is found, can select the service to run).
- The second step doesn't find anything (according to the docs, pycharm creates by itself a new target)
- The third step is in infinite loading trying to find a python path
The same happens when trying to use the Docker interpreter (can create image, cannot find a python path environment)
I'm using python 3.11, and uv. The .venv is inside an app folder, not in root. Maybe because of that?
Because I've tried and example with .venv in the root folder and the python path was found.
EDIT: I'm also using the Pycharm Pro as a Trial, don't know if it's different
Please sign in to leave a comment.
Jose Ribeiro ,
Thanks for the report! It looks like something we’ll need to investigate further.
Please create YouTrack ticket and provide a log archive (available via Help | Collect Logs and Diagnostic Data) along with detailed steps to reproduce the issue.
Since your
.venvis tucked inside the/appfolder rather than the root, PyCharm's automatic detection is likely tripping over the non-standard path. When usinguv, the interpreter isn't typically located at the standard/usr/local/bin/pythonpath found in basic images, and PyCharm’s "target discovery" often fails if it can't find a valid binary at the expected project root. To fix this, skip the automatic detection during the third step and manually set the Python interpreter path to the absolute path within your container (e.g.,/app/.venv/bin/python). This should break the infinite loading cycle and allow the IDE to map your local code to the container's environment correctly Everfi.com