简体   繁体   English

使用远程服务器开发和调试Python

[英]Develop and Debug Python with Remote Server

There is a Ubuntu server with Python 3.6 and many other required Python modules installed. 有一个安装了Python 3.6的Ubuntu服务器和许多其他必需的Python模块。

When using Eclipse for Python development, can I connect Eclipse to the full Python environment installed on the Ubuntu server? 使用Eclipse进行Python开发时,可以将Eclipse连接到Ubuntu服务器上安装的完整Python环境吗?

I don't want to install the whole Python environment in the local PC client. 我不想在本地PC客户端中安装整个Python环境。

Thanks. 谢谢。


Latest Update: 最新更新:

I have installed the latest Eclipse (2018-12) and PyDev (7.0.3) plugin and Python (3.6.7) on Windows 10. And I have also created a test file called Test.py with the following content: 我已经在Windows 10上安装了最新的Eclipse(2018-12)和PyDev(7.0.3)插件以及Python(3.6.7),并且还创建了一个名为Test.py的测试文件,其内容如下:

import my_server_module as my; 
print(my.version); 

It doesn't work at all because the "my_server_module" is not installed on Windows 10, it just installed on the Ubuntun server. 它根本不起作用,因为“ my_server_module”未安装在Windows 10上,而是安装在Ubuntun服务器上。

How can I debug the Test.py with connecting to the python environment on Ubuntu server? 如何连接到Ubuntu服务器上的python环境来调试Test.py?

始终使用用于Python应用程序的virtualenv并加载到eclipse中-https: //www.michaelpollmeier.com/eclipse-pydev-and-virtualenv

It seems it is impossible for remote debugging. 似乎无法进行远程调试。 I have installed all the modules in local PC for python development. 我已经在本地PC中安装了所有模块以进行python开发。 This is the only way. 这是唯一的方法。

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

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