3D Printing - How to Upgrade OctoPrint to Python 3

hey there

I just wanted to share a quick guide on how to upgrade your print server to Python 3. If you use a raspberry pi as a print server like myself, odds are you are running OctoPi and OctoPrint. If you've logged into your print server in the past couple days, you might be prompted to upgrade to Python 3 because Python 2 is no longer supported. I had no idea I hadn't updated. I guess I assumed that it was all automatic, but it turns out Python2 hasn't been supported since January 2020. I'm a tad behind lol. So how do you upgrade? Let's take a look.

octopi5.jpg

First, Create a backup. Just incase anything goes wrong upgrading the Python version. It shouldn't, but you wouldn't want to have to completely reconfigure your print server. It's not that hard it's just annoying and tedious. So after you have your backup done, you need to use PuTTY to SSH into the pi. Open PuTTY and enter the IP address of your pi then hit enter.

octopi6.jpg

This will open a command terminal where you're able to interact with your pi over the network. If you set up your print server yourself, you're probably familiar with this process. If not, it's easy. Don't worry.

When the terminal window opens, it'll have you enter the username to log in. By default if you haven't changed it, the user is "pi" and the default password is "raspberry". Who woulda guessed it?\

octopi1.jpg

Luckily some genius made a script that does most of the work for you. Run the command"

curl -L https://get.octoprint.org/py3/upgrade.py --output upgrade.py

then run the command

python3 upgrade.py

This will download the upgrade script and start the process of upgrading. Now you just wait.

octopi2.jpg

You will be shown a list of your installed plug ins. Press enter to continue with the install. You may be asked to re-enter the password - "raspberry".

octopi4.jpg

Now sit back and relax. Python 3 will be installed and OctoPrint will be configured. Now you're smooth sailing. This will take a while so go drink some water. I ended up having to do this twice due to the first one failing. I'm not exactly sure why it failed, but that's why you always make a backup.

That's it.

You print server is now up to date and you'll stop getting that super annoying pop up.



0
0
0.000
2 comments
avatar

Congratulations @l337m45732! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You distributed more than 5000 upvotes.
Your next target is to reach 6000 upvotes.
You have been a buzzy bee and published a post every day of the week.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

0
0
0.000