3
votes

I'm trying to connect to a remote python interpreter but I'm getting the following error in the Python Console:

ssh://[email protected]:22/usr/bin/python3.6 -u /home/ubuntu/.pycharm_helpers/pydev/pydevconsole.py 0 0
Couldn't connect to console process.
Process finished with exit code -1

I'm using the following:

Pycharm version: Pycharm Professional 2017.3.4.

Project interpreter: Remote Python 3.6.5 (ssh connection to a remote virtual ubuntu 16.04 server built thru OpenStack).

Deployment: SFTP, auth type: Key pair with private key file.

The SFTP connection works fine, synchronization of the code to the remote server also works fine. But I can't seem to run any code in the Python Console.

Any ideas on how to solve this?
Thanks in advance for the help!

1
I also have same problem. - Keiku

1 Answers

0
votes

When I try to connect directly to port 22, I get an error like below.

ssh://keiichi.kuroyanagi@mygcp:22/home/keiichi.kuroyanagi/.pyenv/shims/python -u /home/keiichi.kuroyanagi/.pycharm_helpers/pydev/pydevconsole.py 0 0
Couldn't connect to console process.
Process finished with exit code -1

I now connect to remote console by configuring portforwarding in RoyalTSX as below.

enter image description here

The console is as follows.

ssh://keiichi.kuroyanagi@localhost:10022/home/keiichi.kuroyanagi/.pyenv/shims/python -u /home/keiichi.kuroyanagi/.pycharm_helpers/pydev/pydevconsole.py 0 0

import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['/home/keiichi.kuroyanagi/tmp/pycharm_project_444', '/home/keiichi.kuroyanagi/tmp/pycharm_project_444'])

Python 3.6.7 |Anaconda, Inc.| (default, Oct 23 2018, 19:16:44) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.1.1 -- An enhanced Interactive Python. Type '?' for help.
PyDev console: using IPython 7.1.1

Python 3.6.7 |Anaconda, Inc.| (default, Oct 23 2018, 19:16:44) 
[GCC 7.3.0] on linux

In[2]:

The following link may also be helpful.

Can't connect to remote interpreter python console : PY-18029 https://youtrack.jetbrains.com/issue/PY-18029

My pycharm version is as follows.

PyCharm 2018.2.4 (Professional Edition)
Build #PY-182.4505.26, built on September 19, 2018
Licensed to DeNA Co.,Ltd. / Keiichi Kuroyanagi
You have a perpetual fallback license for this version
Subscription is active until October 24, 2019
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6