Raspberry Pi - Python 2 & 3 Install Setup and Update

Raspberry Pi - Python 2 & 3 Install Setup and Update

Gam3T3cH Electronics

4 года назад

49,450 Просмотров

As requested by AndrewA a quick and easy way to get python installed and make sure its updated as well as working correctly.

If you have any suggest or anything you would like to have me show please reach out to me and let me know.

Thanks again to AndrewA for the questions I hope it helps.

Commands in terminal (press Crtl + Alt + t) on your keyboard.

sudo apt-get install python
sudo apt-get install python3

if already installed

sudo apt-get upgrade python
sudo apt-get upgrade python3

to check installed version there is 2 ways to do this in terminal

First:
python (hit enter)
press ctrl+d to exit
python3 (hit enter)
press ctrl+d to exit

both of those should run the real time programming screens for python.

next would to type the following in terminal

python --version
python3 --version

Make sure to add the following at the start of your program so it knows which python version to run.

For python 2 copy this to line 1
#!//usr/bin/python

For python 3 copy this to line 1
#!//usr/bin/python3

Now that is the default if you installed everything the way it should have been on the pi and didn't change anything from the defaults that should work. There is a command to find the install location for it its late at night and my brain shut off a hour ago so I will update later with it.

Thanks again for watching.

Recommended books:
Python in 24hrs Raspberry Pi: https://amzn.to/37PDZuz
Raspberry Pi & Python beginners: https://amzn.to/2w25DqY

My Daily Pi Setup:
Raspberry Pi 2GB: https://amzn.to/2VftWfR
USB 3.0 enclosure: https://amzn.to/38UDWir
Logitech C922 Webcam: https://amzn.to/2SVJTGB
Neewer NW-700: https://amzn.to/2HPds6o
Digiflex Mic cable: https://amzn.to/2HOGJOr
Behringer Q502USB: https://amzn.to/2vaXoZF
Asus Blu-Ray: https://amzn.to/2HMiXT1
Logitech Wireless Combo K235: https://amzn.to/2PijEaR
Samsung 860 Evo SSD: https://amzn.to/2HMmd0H
Kingston 120gb SSD: https://amzn.to/39ZpvtL
Lexar 32gb Micro SD: https://amzn.to/37WCpqN

My other common equipment:
Gigabyte Brix: https://amzn.to/37Sy3kP
Roxio HD: https://amzn.to/32j2YW6
USB Microscope: https://amzn.to/2Pj4Fhb
Rode VideoMic Go: https://amzn.to/3cbKFqy
Canon T6i: https://amzn.to/37RyBHq
gopro hero 7 white: https://amzn.to/37P1HHr
3D Printer (similar to): https://amzn.to/3c1b5er

Тэги:

#Raspberry_Pi #Python #Python_3 #python_2 #raspi #raspberry_pi_4 #raspberry_pi_3 #raspberry_pi_2 #python_install #python_setup #tutorial #how_to #diy #raspberry_pi #python_3 #raspberry_pi_4_python #raspberry_pi_4_setup
Ссылки и html тэги не поддерживаются


Комментарии: