Configuring docker remote interpreter gives error "Can't create Python SDK"
I am running PyCharm PE 2017.3 and try to connect to a remote Python interpreter based on Docker.
In the settings dialog PyCharm conforms that I can connect to the remote machine via port 2375 over tcp.
I have selected a python:3.5 image from Red Hat which is available on the Docker VM and can be run remotely via shell command. So this works:
sudo docker run -h tcp:<hostname>:2375 -it --rm <registry-url>/python:3.5 bash
However if in Pycharm I click "OK" in the settings-dialog Pycharm freezes for a while and then an errorbox appears with title "Can't create Python SDK" and message "Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/busybox/images. You may want to check your internet connection or if you are behind a proxy."
Indeed I am working in an Enterprise environment which has no internet connection, but that should not be necessary because the Python docker image I am using is available in our private Docker registry.
So what do I have to do to get his working?
Any help appreciated
请先登录再写评论。
Hi Dj Van Kuijk! The problem here is PyCharm needs busybox image. Corresponding answer and ticket: https://youtrack.jetbrains.com/issue/PY-26803#focus=streamItem-27-2653525-0-0
Hi Pavel
Thank you for your help. I installed the Busybox image on the Docker host and this seems to avoid the previous error. The next error I get is this:
Couldn't refresh skeletons for remote interpreter
failed to run generator3.py for <deleted>.
exit code 127, stderr: ----- python: error while loading shared libraries: libpython3.5m.so.rh-python35-1.0: cannot open shared object file: No such file or directory ---
Any ideas on what is happening here?
Hm, sounds similar to PY-26488, could you please check this answer: https://youtrack.jetbrains.com/issue/PY-26488#focus=streamItem-27-2528447-0-0
Hi Pavel,
In my case executing below command will give me a Python prompt as expected.
sudo docker run --rm -it <registry-url>/python:3.5 /opt/rh/rh-python35/root/usr/bin/python