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.

5

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.

3

Restarting pycharm solved the python console problem too.

0

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!

0

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! 

0

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.

0

It seems like pycharm adds an http_proxy env variable to the started container. This would explain the connectivity issues.

 

 

0

There is an open bug report in YouTrack: PY-55394. Feel free to follow it.

1

Disabling python.use.targets.api worked for me. What a hassle.

0

@Neta

 

Disabling python.use.targets.api worked for me.

thanks.

0

Facing this on PyCharm 2022.3.2 (Professional Edition).
Disabling python.use.targets.api worked as well.

Thanks!

0

请先登录再写评论。