Can I use PyCharm windows with VirtualBox ubuntu - python

Can I use PyCharm (non-professional version) to develop code in windows and SSH or integrate virtualbox into PyCharm so it can send to my host in virtualbox Ubuntu server?

Yes you can. Share you code folder from windows using Vagrant or your virtual box into ubuntu and edit the code from pycharm windows. You can even debug code from ubuntu using pycharm. I have done this for months with Vagrant VMs.

Related

Visual Studio Code Remote Python Debug on Windows

Is it possible to remotely develop and debug Python code on another PC on the same network (both Windows 10)? If so, what is the best way to do this?
I tried mapping a network drive to the project folder on the remote PC. I could open the folder in vs code, but cannot get it to start my virtual environment on the remote machine to start debugging. When I do "Select Python Interpreter" and choose the appropriate venv on the remote machine it does nothing. The same process works fine if the venv is installed on the development machine.
I normally use WSL remote for C++ development and it works great but cant find any documentation for remote Windows development, just WSL, docker and SSH (maybe an option?)
Advice appreciated. Thanks in advance...

Python plotting on remote server using PyCharm

I have started to learn Python and so far my setup has been following - Python 3.5 installation on Win10 64bit local machine with PyCharm as a great IDE. Everything works, matplotlib charts and other visual outputs display fine, debugging works, etc.
Now, I have came across some libraries which works only on Linux. I have set up Ubuntu 16.4 64bit VPS on Digital Ocean, installed Python 3.5. In PyCharm I have set up SFTP connection to remote host. Code running works, debugging works, however, I am not able to bring display output (matplotlib plots,...) to local (Win10) machine. As I am not at all familiar with Linux GUI environments (X11?), after googling I have following questions:
1) Should anything be installed on remote Linux machine? (e.g. x11 client/server/smth?)
2) Should anything be installed on local Win machine? (e.g. Xming?)
3) Should anything be configured on remote Linx machine? (e.g. X11 forwarding)
4) Should anything be configured on local Win machine PyCharm?
5) There are X11 forwarding settings in Putty and some have suggested to use those but I am not sure, should Putty session run in paraller with PyCharm and can that be avoided.
Thanks a lot!
PS - I have installed Jupyter Notebook (and latest Jupyter Lab) on remote machine and it works excellent, however I am still prefering PyCharm as primary IDE with better code completion, debugger and other perks.
Ok, after some more googling I finally managed to get this process working, hope it helps somebody:
1) on remote host (VPS, Ubuntu 16.04) I had to install X11 server, which I did by:
sudo apt-get install xorg
sudo apt-get install openbox
2) On remote host I had to make sure that X11Forwarding is enabled in /etc/ssh/sshd_config
3) On local Win10 machine I had to install Xming server and launch it with default settings.
4) On local Win10 machine I had to configure Putty to use X11 forwarding (Connection-> SSH -> X11 Forwarding) with default settings and keep connection open while running PyCharm (it seems there is no option in PyCharm to enable x11 forwarding, so putty must be running in the background)
5) On remote machine I had to check Display number (echo $DISPLAY) - this can be different for everyone. For me it was localhost:10.0
6) In PyCharm Run configuration -> Environment variables I had to add DISPLAY=localhost:10.0
After all these steps and Putty+Xming running in backgroud, I was able to execute remote code and bring graphic back to my Windows 10 PC!
PS - process is actually slow, I have to wait around 10 seconds before image is brought back to me. I am not sure why or how to speed it up. Might be another question. (reducing chipher strength and enabling compression does not help. It seems some sort of initialization problem with x11 remote and local)
Mac user should install XQuartz instead of Xming.
And another important thing: if you install xquartz via homebrew, you should relogin your macos or reboot.
As the rackpas's answer saying.

how to debug python in IntelliJ idea using vagrant docker

I am using Vagrant with a Ubuntu machine. Inside Vagrant I am using multiple docker boxes. One of them is for my Python Django Api.
Is there any good way to connect to Django with IntelliJ Idea/Pycharm ?
I am trying to using pycharm-debug.egg but I can't connect.
Should I forward the port from docker to Vagrant and Vagrant to my machine?
Any tutorial/help would be great.
Thanks

Python Remote Debugging with Pycharm

I have the following set up:
A Linux machine that have python code I want to run and launch the debug server
A Windows machine that have Pycharm installed, I want to connect to the Linux machine above to debug my code
What should I do to on the Linux machine and how to start the debug server there? (Noted: I can not installed pycharm on that machine)

import python module/packge into remote machine

I have setup virtual box and install package (WxPython) into virtual machine and doing programming for learning wxpython and Python. we connect into remote machine using putty in windows and ssh in virtual box.
I want to do some experiment/analysis with exiting code using WxPython But we do not have permission to install python package into remote machine. if I raise ticket package to install package towards IT team it require lot of business justification.
As it is my personal interest, I do not have any business reason
is it possible,can I access wxPython package into remote machine which is installed into virtual box.
I am not in any way associated with the tool I am going to suggest. I have used Vagrant with VirtualBox and it has worked fine for me.
The code is in a folder which is accessible from both Virtual as well as Base machine.
Can you not install it locally on the remote machine, and not globally, then just export that python path?

Categories