简体   繁体   English

我们可以使用Spyder从Docker容器远程运行和调试Python代码吗

[英]Can we remotely run and debug Python code from a Docker container using Spyder

JetBrains PyCharm is able to remotely run and debug Python code from inside a Docker container. JetBrains PyCharm能够从Docker容器内部远程运行和调试Python代码。 Also, it is able to do the same task using an Anaconda environment. 而且,它能够使用Anaconda环境执行相同的任务。

I would like to ask if it possible to perform such a task (using either Anaconda or Docker) with the Spyder IDE. 我想问一下是否可以通过Spyder IDE执行这样的任务(使用Anaconda或Docker)。

My objective is to run and debug Python code using a Docker container that lives remotely to a different machine. 我的目标是使用远程存在于另一台计算机上的Docker容器运行和调试Python代码。 The Docker container contains the appropriate Python interpreter as well as the Python modules I need. Docker容器包含适当的Python解释器以及我需要的Python模块。

Please help. 请帮忙。

According to the spyder doc it is possible for conda environment using ssh : http://docs.spyder-ide.org/ipythonconsole.html#connect-to-an-external-kernel . 根据spyder文档,可以在sda的conda环境中使用: http : //docs.spyder-ide.org/ipythonconsole.html#connect-to-an-external-kernel

For Docker container the same steps should work according to this issue . 对于Docker容器,应根据此问题执行相同的步骤。

But I have not tried this myself. 但是我自己还没有尝试过。

EDIT : Otherwise, if you like to edit your remote code as well as running it. 编辑:否则,如果您想编辑并运行远程代码。 You can use Visual Studio Code Insider (available here ) It is a preliminary version of what should be included natively in Visual Studio Code soon. 您可以使用Visual Studio Code Insider(可在此处获得 ),它是应很快包含在Visual Studio Code中的内容的初步版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM