Python: Fix issues using PyCharm and Docker

less than 1 minute read

  1. If you try to run a Docker container from within PyCharm, and you get something like:
Couldn't refresh skeletons for remote interpreter


can't open file '/opt/.pycharm_helpers/pycharm/'

Then you should clear all pycharm helpers from your docker containers and images:

docker ps -a | grep -i pycharm | awk '{print $1}' | xargs docker rm
docker images | grep -i pycharm | awk '{print $3}' | xargs docker rmi

Via Christian Kreuzberger.

  1. Another useful troubleshooting tip for Docker-related errors is to select File > Invalidate Caches... within PyCharm, and then restart the app.