Change Python version? (Noob question)

What is the problem? I'm a bit of a noob & I'm not sure how to change python from 2.7.16 to 3.7 under Raspbian. Checking to see if I found the correct command & if I should actually switch now that Octoprint supports python 3.x .

I found alias python="/usr/bin/python3.7" is that the correct way to change or is there a better way?

Is there guide I've overlooked?

What did you already try to solve it? Google, but I'm finding the responses on the old side so I'm asking before I break something.

Logs (octoprint.log, serial.log or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support!) N/A not getting an error just looking to reduce my noobness.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible)
Octoprint 1.4.0 Raspberry PI 4 Ender 3.

Then don't. At least not yet. Python 2 is "End of Life". That means it is no longer actively being maintained. It does not mean that it will immediately stop working.

Setting up an environment for OctoPrint to run with Python 3 is fairly involved now. Far from all plugins are fully working with Python 3 yet.

There will eventually be an OctoPi image that runs OctoPrint with Python 3 out of the box. You may want to wait a little longer.

1 Like

Fair. To clarify I'm inexperienced with linux, not computers. I don't plan on using the image, I built the system myself & manually installed everything as learning experience. One of my goals for the system is specifically to become more linux proficient.

Thanks for reminding me I have to make sure the plugins are compatible with python 3.

Once they are; where can I find the information needed to perform the switch to python 3 without re-imaging? This is far more about learning for me than it is about being the easiest.

Thanks!

Honestly, you probably have a working printer. Invest in the $8 for a second microSD card and work up a second image with Python 3 on that if you'd like to play with the effort (and still leave your original rig in a working condition). You can always swap back in the first microSD and get some work done.

Here's what the developer's are now using to get a Python 3 platform under their feet for testing purposes.

Thanks! I do have a back up & have had to revert a couple times - the joys of learning! :slight_smile: I'll check out the link

1 Like