Search code examples
pythonpycharmcross-platformopenssh

PyCharm Remote Python Interpreter Across Platforms


Is it possible to work with a Windows python interpreter from an OS X PyCharm instance?

I'm developing some python code for the Windows environment (uses Windows-specific packages) but would like to stay in the OS X environment for all the development. I was hoping PyCharm's Remote Interpreter option over SSH would allow this, but I keep getting the following error. It appears after connecting OS X PyCharm to a Windows 10 Anaconda interpreter (over SSH).

Couldn't refresh skeletons for remote interpreter
failed to run generator3.py for sftp://[username]@[host]:22/Users/[username]/AppData/Local/Continuum/anaconda2/python.exe, exit code 1, stderr: 
-----
'env' is not recognized as an internal or external command,
operable program or batch file.~
-----

A few (possibly) helpful pieces of info:

  • SSH server is the Windows 10 built-in OpenSSH
  • I get the above error even when I try connecting to the same remote interpreter (via SSH) from Windows PyCharm. This suggests to me that the issue isn't caused by mixing platforms.
  • Finally, I can connect to and interact with the desired Windows Anaconda interpreter from OS X PyCharm using the built-in Start SSH session (in the Tools menu). This also works from Windows PyCharm. Things start going south when I try to use it as the project interpreter.

Solution

  • This is not possible as of version 2019.1.3 released 29 May 2019. Pycharm doesn't support Windows remote interpreter. See the link below to the JetBrains issue tracker page discussing the desired functionality.

    https://youtrack.jetbrains.com/issue/PY-20952