There is a Ubuntu server with Python 3.6 and many other required Python modules installed.
When using Eclipse for Python development, can I connect Eclipse to the full Python environment installed on the Ubuntu server?
I don't want to install the whole Python environment in the local PC client.
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:
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.
How can I debug the Test.py with connecting to the python environment on Ubuntu server?
Always use the virtualenv for python app and load into the 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. This is the only way.
Related
I want to set up a Django project with docker-compose and PyCharm on my PC with Ubuntu 22.04 OS. Using PyCharm 2022.2.1 (Professional) I get the following error
How to solve Local path is not registered within uploads in the request
I added a Python interpreter from Settings > project > Python interpreter and then add interpreter > on SSH after that entered ssh credentials and on the system interpreter finally I created the Python interpreter.
I have docker-compose run on another terminal.
After I run the runserver command it shows this error:
this is the runserver command configuration:
I have recreated the interpreter, and explored the same problems on JetBrains website but couldn't solve the issue.
This bug was reported as PY-55396 on the JetBrains bug tracker.
The bug was solved in PyCharm 2022.2.2, the solution is to upgrade to that version or downgrade to PyCharm 2021.3.
I am running pycharm in my windows box, while my Django project is running inside vagrant ubuntu box, I am pulling all my project files to window pycharm along with the remote python interpreter(which is OS default). The problem is I am not able to setup the remote virtualenv python interpreter.
How to set up remote virtualenv python interpreter in pycharm ? not the default OS one.
I need to run a process inside a windows host from a linux host using python.
I saw WMI python library but seems to work only from a windows host, not linux, how can I do?
I neeed something like PSEXEC, but it works only for windows.
Since you cannot install anything on the windows host, does it have openoffice, or libreoffice installed?
You coult then use the Python interpreter bundled with it to create a python script that listens to xmlrpc and get you job done, controling this script remotely.
If there is no Python installed on the windows side, and yur remote host is Linux, there is this recipe here: http://code.activestate.com/recipes/577945-execute-remote-commands-on-windows-like-psexec/
It does depend on windows - as it imports win32wnet - in my experience, these windows specific modules will run fine in a Windows python installed on a Wine configuration on a Linux machinne.
An easy solution is to run a SSH server on the windows box and use the paramiko library on the client side.
Each time I upload my app to Google App Engine, the logs always show this warning:
WARNING appengine_rpc.py:435 ssl module not found. Without the ssl
module, the identity of the remote host cannot be verified, and
connections may NOT be secure. To fix this, please install the ssl
module from http://pypi.python.org/pypi/ssl .
I'm running a virtualenv with Python 2.7. When I'm in it, I try to run
$ pip install ssl
but this produces an error:
ValueError: This extension should not be used with Python 2.6 or later
(already built in), and has not been tested with Python 2.3.4 or earlier.
If ssl is built in to Python 2.7, how do I tell the local development server to use the built in ssl module?
It sounds like appcfg.py is not using your virtualenv correctly. You can try editing the appcfg.py script so that it prints sys.version and sys.path, to confirm that it's using your virtualenv correctly. (The shebang line is "#!/usr/bin/env python", so that should use your active environment, but it's worth checking.)
If you're using the Launcher, you need to tell it explicitly where to look for your virtualenv's Python. Go to Preferences, and set the Python Path to your virtualenv's Python 2.7. The Launcher prints which Python path it is using in the Logs (at least when starting the dev server).
At the moment I'm developing using a simple editor, putty, and a VirtualBox instance of a linux server. I've heard good things about pydev and would like to try it, but I'd like to use the python install & terminal from my VirtualBox guest OS.
I'm already using a Shared Folder with VirtualBox so my Guest OS can see my local files.
Is it possible to tell pydev to use this "remote" host over SSH to execute its python-related commands?
UPDATE:
My main environment is windows, but I'd also like to be able to work this way on OS X.
I assume your host box is windows.
I also assume that pydev will run under linux (since it's eclipse based). Are you ok installing the dev environment on your linux server?
In which case:
install and run xming on your windows box
Install eclipse & pydev on your linux box
Configure x forwarding in putty
Run pydev through putty and you'll have the UI appear on your windows machine like normal
Then pydev will be running on the linux box quite happily, and so using the python environment on there.
Downsides: you will need to install the X libraries & java on your server (installing eclipse using your normal package manager should be enough), although you won't need to run X itself, since that's what Xming is for.
UPDATE:
Let me understand the situation, Windows is hosting the virtualBox which host the linux.
You connect to the linux using putty.
Python files are on the linux machine and you wish to edit them from your Windows using pydev. So either do that using the sharing features of virtual box (which can work for you in vboth ways) or use ssh to edit the linux files from windows.
both options would be valid for MacOSx AFAIK
Below you cna find the way to do so over SSH
You map a netwrok drive over SSH and then you can access the files via that drive letter
see more at
http://www.neophob.com/serendipity/index.php?/archives/103-Map-a-Network-drive-net-use-over-SSH.html
and
http://smithii.com/map_a_network_drive_over_ssh_in_windows