Giter Club home page Giter Club logo

Comments (2)

cp2004 avatar cp2004 commented on May 27, 2024

This script works for 99% of use cases, I don't see an easy way through to make this work while keeping it as simple as it is for the normal OctoPrint user.

It needs to run as the user OctoPrint is installed as, pi in your case so that it can access the installation, the plugins, make a backup and copy the stuff across to the new installation. It also needs to check that a few packages are installed. First it runs sudo apt update, then some dpkg commands that don't actually require root access to check if it needs to install additional packages. I guess the apt update could be switched and not run if not necessary, and you can just install python3-dev and python3-venv manually if this problem affects you.

I don't know of a way I can get people to run this script, run some things as one user and the rest as another user without running it as root. Running it as root then means I have to get people to provide the user they have installed OctoPrint as - this is harder than it sounds, as people try and run this script in OctoPrint's terminal for printer communication sometimes - most of them have no idea.

I won't be turning it on it's head and redesigning this script just to fit your use case - it sounds like you understand the process well enough to do it manually, so here's the 5 steps:

  1. Take a backup from within OctoPrint's backup/restore page. Can exclude everything possible.
  2. Move old virtualenv out of the way with mv <path to old> <somewhere else for safekeeping in case it goes wrong
  3. Create a new one: python3 -m venv <path>
  4. Install OctoPrint: <path>/bin/pip install octoprint
  5. Restore the backup to automatically download the plugins.

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 27, 2024

If you still need help upgrading your install to Python 3, please reach out on the community forums or discord server for assistance.

from octoprint-upgrade-to-py3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.