Pycharm 2022.2 docker-compose issues
已回答
Since the update to 2022.2 the docker-compose interpreter is not working properly. First, the PYTHONPATH is ignored in run commands (it uses /opt/... instead). Second, the python console is not working ("Nothing to show").
I saw that people are having similar issues with Docker, is it the same issue? What would be a recommended solution?
Thanks.
请先登录再写评论。
Okay, this solution helped me to fix the PYTHONPATH bug:
1. go to Help | Find Action | Registry
2. disable python.use.targets.api
3. recreate the interpreter from scratch
However, the python console is still unavailable.
Restarting pycharm solved the python console problem too.
I had the same problem and this solution also worked for me! But I'm interested in why it changed and why this fixed it? ...Thanks for sharing!
Brilliant, this fixed it for me too -- looks like that targets api is completely broken. Tried for an entire day and there's nothing I could do to get it to work. Everything Docker-related was broken for me!
I am using PyCharm 2022.2 as well.
The container running the interpreter had network issues both to other containers in the machine and to the internet (I could not execute `apt update` inside as an example).
Using the suggested workaround resolved the issue.
It seems like pycharm adds an http_proxy env variable to the started container. This would explain the connectivity issues.
There is an open bug report in YouTrack: PY-55394. Feel free to follow it.
I reported it to support and they say it's probably related to this bug:
https://youtrack.jetbrains.com/issue/PY-55416/Docker-Compose-interpreter-doesnt-run-code-correctly-after-update-to-20222
Disabling python.use.targets.api worked for me. What a hassle.
@Neta
Disabling python.use.targets.api worked for me.
thanks.
Facing this on PyCharm 2022.3.2 (Professional Edition).
Disabling python.use.targets.api worked as well.
Thanks!