Red squigglies when using Docker remote interpreter

Hi all,

I'm got a remote interpreter configured in a Docker container and can run and debug the application. However, in the editor, I've got the red squiggles showing whether the container is running or not. This indicates pip installed modules aren't found and reduces the capabilities of PyCharm when it can find the modules. Does anyone know how this can be addressed?

Thanks,

Doug

1
2 comments

I have the same issue:
requirements.txt

requests

Dockerfile

FROM public.ecr.aws/lambda/python:3.9
COPY requirements.txt .
RUN pip install -r requirements.txt
ENTRYPOINT ["/bin/bash"]

main.py

import requests
p = requests.get("https://www.jetbrains.com/idea/")
print(p)

When running and debugging code it works fine:

/var/lang/bin/python /tmp/bc2193dc-82ef-4fd7-a861-0634c51c9475/main.py 
<Response [200]>
Process finished with exit code 0

But cannot use the IDE due to unresolved deps

 

IntelliJ IDEA 2022.3 (Ultimate Edition)

Have tried to run after rebuilding docker:

- Rescan Available Python Modules and Packages

- File -> Invalidate Cache

- Adding and removing the interpreter

 

Any ideas how to use IDE in this config, as without navigation and resolving names it's quite useless.

0

Hi, there's a known issue about this image, which may be related https://youtrack.jetbrains.com/issue/PY-55444/Creating-a-docker-interpreter-fails-with-Introspection-completed-with-error-with-a-certain-image

Regardless, when I build the image using your Dockerfile and then attempt to run it with `docker run --rm -it <image> /bin/bash` I get "/bin/bash: /bin/bash: cannot execute binary file". I haven't looked further yet.

Is the issue reproduced with some other image? E.g. `python:3.10`? 

0

Please sign in to leave a comment.