Remote Interpreter not working
已回答
I am using the latest pyCharm 2018.2.4, and anaconda3 with python 3.6.6.
When I try to execute code into the interpreter I am getting the following error:
ssh://ubuntu@enc-aws-ai01:22/home/ubuntu/anaconda3/envs/dsproject/bin/python -u /home/ubuntu/.pycharm_helpers/pydev/pydevconsole.py 0 0
Couldn't connect to console process.
Process finished with exit code -1
If I do Tool -> Start ssh session it works fine.
Please let me know if you need extra logs, or further info so i can hlep debug this issue.
请先登录再写评论。
Hi Daniel,
Thank you for contacting PyCharm support.
It seems it should be fixed in 2018.3 https://youtrack.jetbrains.com/issue/PY-18029. Could you please try it in EAP https://www.jetbrains.com/pycharm/nextversion/ and see if the problem persists?
Kind regards,
Sergey
https://www.jetbrains.com
The Drive to Develop
Hi,
Thanks for the prompt reply.
I downloaded the EAP and I still cannot use remote python interpreter. I assume this may be related with some firewall issues? Which ports do I need to open on my local PC and on the remote Linux server? - the reason I assume it may be some connectivity/port issue is because we recently made changes to our network config and this is when all problems started.
For a full description of the problem:
PyCharm 2018.3 EAP (Professional Edition)
Build #PY-183.2940.3, built on September 25, 2018
PyCharm EAP User
Expiration date: October 25, 2018
JRE: 1.8.0_152-release-1293-b14 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
idea.log:
2018-10-01 13:41:37,360 [ 301080] INFO - rationStore.ComponentStoreImpl - Save blocked for $WORKSPACE_FILE$
2018-10-01 13:42:16,546 [ 340266] INFO - lidation.Pep8ExternalAnnotator - Found no suitable interpreter to run pycodestyle.py. Available interpreters are: [
2018-10-01 13:42:16,547 [ 340267] INFO - lidation.Pep8ExternalAnnotator - Path: sftp://ubuntu@enc-aws-ai01:22/home/ubuntu/anaconda3/envs/dsproject/bin/python; Flavor: com.jetbrains.python.sdk.flavors.UnixPythonSdkFlavor@1a5f7c84; Remote: true
2018-10-01 13:42:16,547 [ 340267] INFO - lidation.Pep8ExternalAnnotator - ]
2018-10-01 13:42:16,999 [ 340719] INFO - hon.packaging.PyPIPackageCache - Loaded 153682 packages from C:\Users\dfernandez\.PyCharm2018.3\system\python_packages\pypi-cache.json
2018-10-01 13:42:17,077 [ 340797] INFO - plots.PySciEnvironmentProvider - Plots on port: 57225
2018-10-01 13:42:17,159 [ 340879] INFO - plugins.remotesdk.RemoteUpload - Uploading helpers to /home/ubuntu/.pycharm_helpers
2018-10-01 13:42:17,159 [ 340879] INFO - ellij.ssh.SshConnectionService - Creating sftp channel within SSH session @40f0b43d to ubuntu@enc-aws-ai01:22
2018-10-01 13:42:17,365 [ 341085] INFO - plugins.remotesdk.RemoteUpload - Remote helpers version is PY-183.2940.3, local helpers version is PY-183.2940.3
2018-10-01 13:42:17,408 [ 341128] INFO - ellij.ssh.SshConnectionService - Creating sftp channel within SSH session @40f0b43d to ubuntu@enc-aws-ai01:22
2018-10-01 13:42:17,488 [ 341208] INFO - ellij.ssh.SshConnectionService - Executing SSH command: cd /home/ubuntu/DSProjectCodeDev; env "PYCHARM_MATPLOTLIB_PORT"="57225" "PYDEVD_LOAD_VALUES_ASYNC"="True" "IPYTHONENABLE"="True" "PYTHONPATH"="/home/ubuntu/.pycharm_helpers/pycharm_matplotlib_backend:/home/ubuntu/.pycharm_helpers/third_party/thriftpy:/home/ubuntu/.pycharm_helpers/pydev" "PYTHONUNBUFFERED"="1" "PYCHARM_HOSTED"="1" "PYCHARM_MATPLOTLIB_INDEX"="0" "PYCHARM_MATPLOTLIB_INTERACTIVE"="true" "JETBRAINS_REMOTE_RUN"="1" "PYTHONIOENCODING"="UTF-8" '/home/ubuntu/anaconda3/envs/dsproject/bin/python' '-u' '/home/ubuntu/.pycharm_helpers/pydev/pydevconsole.py' '--mode=server' within SSH session @40f0b43d to ubuntu@enc-aws-ai01:22
2018-10-01 13:45:47,010 [ 550730] INFO - rationStore.ComponentStoreImpl - Save blocked for $WORKSPACE_FILE$
2018-10-01 13:46:47,096 [ 610816] INFO - rationStore.ComponentStoreImpl - Save blocked for $WORKSPACE_FILE$
And then all I see in the python console is - has been iddle/waiting for > 1 hour
Thanks for the information.
I think I need a closer look at your full log.
Please try to connect again and upload your idea.log zipped to https://uploads.services.jetbrains.com/ (in order to keep it private) and let us know the name of the zip file. Please also include a screenshot of your remote interpreter configuration in the same zip file.
Looking forward to your reply.
Kind regards,
Sergey
https://www.jetbrains.com
The Drive to Develop
Hi Sergey,
I am still confused as to what the issue is, but I ended up finding a very simple solution. When I connected by DNS name, let's say <dns-name-for-instance> I could ssh into it but i could not use the python console - I believe this is related to the fact that I am running remote code in an AWS instance that does not know it's dns name.
So what I did is put the static IP address of the instance instead of it's DNS name and now it actually works and get no error.
For now I'll use the IP as it is way simpler and it works.
Thanks a lot for such prompt responses and great help!
Thank you for letting me know!
Glad that it works now.
Kind regards,
Sergey
https://www.jetbrains.com
The Drive to Develop
I have a similar issue. I am also using remote Python interpreter but somehow I am not allowed to start the PyCharm anymore. It got stuck in the indexing step. Is that related to the firewall or security issue? Thanks in advanced
Here's the full idea.log file:
Are you behind some proxy? If yes, try setting it in PyCharm.