r/Python • • Aug 26 '18

Remote Python & IDE workflow?

Hi! I'm looking for a way to use a remote Python interpreter (in my case it's a docker container on another machine) with an IDE like Pycharm or VS Code. In principle, it seems possible using just pycharm "remote interpreter" feature, althrough it requires SSH access into that container which I would prefer not to install if possible. Another major piece I have no idea how to make working is plots. I don't need interactive plots, just jupyter-style static ones will work. This sounds like a quite common usecase, but I couldn't find any help on how to set it up. For now I use jupyterlab running in that docker container, but really miss autocomplete and other stuff offered by IDEs. Any pointers welcome!

4 Upvotes

32 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Aug 26 '18

No, you don't need to install Vim / Emacs in the container. I'm not sure how this is done in Vim, but I saw people do it. In Emacs, there's Tramp, it can be configured to execute commands / work with files etc. over multitude of protocols, it can also utilize docker exec and friends to work with containers.

But, even without Tramp, it's easy to modify the command you use for Python interpreter to launch whatever you want, including Python in a Docker container.