1

On my pi3 I have created a virtual environment with Python3.

I run my pi headless, using my Windows 10 PC. I access the pi with 3 apps: - PuTTY for terminal usage; - WinSCP for a file Explorer; and - TightVNC Viewer as a GUI interface (IDLE3)

I often use the VNC (GUI) to debug python scripts, which I find easier than a terminal session (PuTTY).

I wrote a few scripts in the virtual environment, using PuTTY, and I would like to now access them using the GUI interface (VNC) but I don't know how to do it! Is there a command I can execute in the IDLE3 Python shell that allows me access to the virtual environment?

  • Which VNC Server is running on the Pi ? The preloaded RealVNC Server or something you got via apt-get ? – flakeshake Jan 29 at 8:39
  • This is a general programming question (which is off-topic), but essentially you must start the virtual environment and run IDLE from there. – Dmitry Grigoryev Jan 29 at 8:43
  • @flakeshake I am using TightVNC Viewer as I indicated in my original question. – Gary Jan 30 at 17:23
  • @Dmitry Grigoryev I disagree with you... I didn't ask a question related to programming! My question is related to accessing a GUI interface within a virtual environment with a headless Rpi! Your suggestion was to 'start the virtual environment and then run IDLE from there'... I know that I can do that if my Rpi is connected to my monitor (HDMI) but I am trying to understand how I can do that when the Rpi is accessed through my network? – Gary Feb 1 at 18:39
  • Please answer: Which VNC server runs on the Pi ?? This is extremely important. Also, "virtual environment" has a very special meaning for Python programmers and i am 100% sure you are mixing up technical terms, making this question unanswerable. – flakeshake Feb 2 at 21:27
0

In a graphical environment, you must use a "terminal emulator" to access a terminal. I believe the program is just called "Terminal" in the "Start Menu" of the new (post-2016) desktop.

To start IDLE with(in) a virtual Python3 environment (venv) use following commands inside "Terminal":

cd ~/virtualenv_path/
source bin/activate
python3 -m idlelib.idle 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.