Raspberry Pi LESSON 14: Installing Vpython (VIsual Python) on the Raspberry Pi

preview_player
Показать описание
UPDATE JUNE 8, 2023 - Some of you might be having trouble installing vpython according to the instructions in this video. This is due to OS update which causes broken dependencies. If you are having difficulty, try the following steps to install vpython. As of June 8, 2023, these steps work for Buster OS.

Flash fresh Buster Legacy OS
sudo apt install libssl-dev
sudo apt update
sudo apt upgrade
sudo apt install chromium-browser -y
sudo reboot
pip3 install vpython
sudo apt remove python3-pip
pip uninstall cryptography
pip install --upgrade cryptography==36.0.2
sudo apt-get install thonny

I am hoping this works for you.

Announcing the Most Awesome Raspberry Pi Lessons of All Times! This time we RUMBLE!

In this class series, we will be using the most excellent Sunfounder Ultimate Raspberry Pi kit, available here: (Affiliate Link)

In this lesson I will show how to install vPython, visual python, onto the raspberry pi. We will then create a virtual world LED that changes color in synchronization with the color of the LED in the real world.

If you want to grab those cool little straight jumper wires I am using to keep my breadboard builds neat and clean you can snag a box of them here:

If you guys are interested in the oscilloscope I am using, you can pick one up here (affiliate link):

You guys get your hardware ordered so you can follow along at home!

You will also need a Raspberry Pi. I suggest the Raspberry Pi 4. If you do not already have one, this is the most suitable gear I could find:

The Raspberry Pi's are sort of pricy right now, so you can look on ebay or elsewhere to see if there are any deals. You will need a SD card. If you do not already have one, this is a good one:

I like using a wireless keyboard and mouse to have fewer wires. You can certainly use your USB keyboard and mouse, but if you want a nice wireless one, this one works on the pi. We demonstrate this by using a button switch to control a LED.

You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:

#VPYTHON
#RESISTTHEMETAVERSE
#RASPBERRYPI
Рекомендации по теме
Комментарии
Автор

UPDATE JUNE 8, 2023 - Some of you might be having trouble installing vpython according to the instructions in this video. This is due to OS update which causes broken dependencies. If you are having difficulty, try the following steps to install vpython. As of June 8, 2023, these steps work for Buster OS.

Flash fresh Buster Legacy OS
sudo apt install libssl-dev
sudo apt update
sudo apt upgrade
sudo apt install chromium-browser -y
sudo reboot
pip3 install vpython
sudo apt remove python3-pip
sudo python3 get-pip.py
pip uninstall cryptography
pip install --upgrade cryptography==36.0.2
sudo apt-get install thonny

I am hoping this works for you.

paulmcwhorter
Автор

As for 26/June/2023 running RPi OS Bullseye 64bit with python 3.9.2, this solved the issue for me:
Following the video, I ran :
>> pip3 install vpython
The instalation was succesfull, then I ran in python:
>> from vpython import *
>> ball = sphere(radius=2, color=color.red)
Here I got the problem with "AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'", and solved the issue by:
>> quit()

>> sudo pip install pip --upgrade
>> sudo pip install pyopenssl --upgrade

Then followed the video and everything worked!

xaviercasanova
Автор

As you warned us about not using buster I have failed. My raspberry pi is too new for buster, so I see some sort of fix is available in the comments. I will revisit this another time! Thanks for all your great lessons

stephenlightkep
Автор

Did anybody else notice the ant on the Breadboard? You can see the little fella at about 21 minutes. I have decided to call him(?) Eggbert! All hail Eggbert. Also thank you Paul for these great videos!

mitulshobbies
Автор

Paul - great tutorial series, i love each and everyone.

PlausibleIdea
Автор

Paul, Thanks for another great video. I found vPython great for learning more about Python and 3d rendering. It makes a great simulation tool. I am glad your videos cover it so well but I do find it falls short as a user interface. Thanks again and looking forward to what comes next.

keithlohmeyer
Автор

Homework done, I'm back catching up! I won't miss that raspberry pi mid-term exam for anything in the world.

aman-sood
Автор

I've made 3 videos just in case anyone is interested in my pico programs.

charlotteswift
Автор

Paul: Please start the nano editor with the option -l f.e. nano -l <filename>
Tnx for your nice lessons.

henkoegema
Автор

Paul, amaaagggiiing video thanks, got a bit of a problem at first, but got it later, btw, will there be any raspberry pico series??

dibyojyotibhattacherjee
Автор

Real cool lesson, my virtual led model coming soon!

aman-sood
Автор

Of course this was another great lesson! Thank you Paul!

larryplatzek
Автор

sorry, I skipped it yet did create a object array of the RGB and had it randomly change colors. I did learn a lot of needed information by doing so and have a very cool looking RGB LED slowly changing colors. :) Even got myself singing: Python can do Object arrays! :) Not sure if you covered this, but to get the best results from the RGB make sure that you set each color to a max of 33 so you will not get to much bleeding of colors as you more or less have 300% if you have all 3 colors maxed.

OZtwo
Автор

Hello Sir,
good morning,
I'm from India, i use to watch your videos, and since now I'm really very impressed, nd being encouraged by ur videos.. thanks a lot, Keep helping us such the way u r expert in...
and i want to have your contact information, so that i also can share, something, very important topics, .. i have a great revolutionary innovating Idea on Robotics, nd human feelings transfering to a robot.. so I'll be waiting for your response.. thanks again.. have a great day

Polarisstatus
Автор

I'm on RPi OS Bullseye with Python 3.9.2, installing VPython was quite painful, I got this error "AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'", quick search on Internet says that upgrading pip "pip install --upgrade pip" and installing/updating pyOpenSSL "pip install --upgrade pyOpenSSL" will fix that error, but that did not work for me, because VPython installation somehow trashed my pip command... Turns out that running previous pip upgrade command with sudo fixed my pip installation and then was able to run second command (without sudo) to upgrade pyOpenSSL and voilà!, now I can run VPython on my RPi. Thanks for this lessons, Paul. Editing comment to add that processor gets very hot when running VPython, even with heatsink and 5v fan, RPi goes from (regular) 48º Celsius to 72º or more and has restarted few times on its own, I think it need a better cooling system, since is also overclocked to 2 Ghz.

freddyveza
Автор

This is a fantastic series.!!
HOWEVER, I have a question for the group.
Has anyone been able to replicate the installation of VPYTHON?!? I did get it working about the time that Paul released this lesson, but after working the homework for a couple of the VPYTHON episodes, I did an accidental upgrade and then NOTHING WORKS
🙁☹😦
If anyone has been able to get this working on their Raspberry Pi 4 I am asking that they PLEASE create an in depth reply that explains WHICH Buster OS they installed (version / date of Buster), and then provide step by step instructions so the installation of VPYTHON will work. I have tried everything I can think of and still can not seem to get the installation to run without fatal errors. Typically failure notices have to do with Cryptography failing, or not finding a RUST compiler, etc.

Thanks In Advance!

Lehibob
Автор

I had the same issue as some of the other viewers did with downloading vpython. Finally got it working after a couple days of tinkering. Got my homework done successfully. Completely new to publishing anything on youtube but hopefully I was successful at that part of it. Couldn't figure out how to do a screen capture of the video so I shot it with my phone. I also haven't been able to figure out how to edit the video now that I made it. Oh well, you get the idea. Might want to mute it as I didn't add any cool music. Just my wife making noise in the background.

tntragan
Автор

Please do more lessons using the Oscilloscope

anwar
Автор

Paul, I purchased my Pi in January of this year (2024) and I cannot get the vpython to work and when I try to install it I get more warning than a 747 in full engine failure fire!! Don't want to fry my Pi so skipped trying to load it and do the home work.

WilliamLundy-et
Автор

Hi Paul, I know I am a little late, but my vpython installation does not work. At first, I got the error message: "Failed to build wheel for cryptography". After a few tries the installation just stops at "building wheels for cryptography", and the CPU gets really hot, even with the heat sink (about 70 Celsius). I tried everything I could find online, but I can't get past that stage. Any ideas? (P.S. really enjoying the series so far!)

ericsandels
visit shbcf.ru