Giter Club home page Giter Club logo

Comments (5)

wilbo70 avatar wilbo70 commented on May 27, 2024 2

Thanks! That did the trick!
Indeed odd that it wasn't installed?
I followed the link for bed-visualizer and installed libatlas3-base, after which this also worked again!

Have a good weekend!

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 27, 2024 1

Hey @wilbo70 - did you get anywhere with this?

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 27, 2024

Try running python3 -m pip install requests (it should be there by default on OctoPi 0.17, but hey). If that does not work, you may have to install pip first (sudo apt update, then run sudo apt install python3-pip)

Then you can run the script again

from octoprint-upgrade-to-py3.

wilbo70 avatar wilbo70 commented on May 27, 2024

Hey @wilbo70 - did you get anywhere with this?

Hi, sorry for the wait. I didn't find the time during the week. I just tried, and I did have to install pip, it wasn't there? I then ran the script again (checked that you hadn't published a new version first :) ). And had the same results I am afraid?
I have added the full SSH history

login as: pi
[email protected]'s password:
Linux octopi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Oct 16 15:05:50 2020 from 192.168.2.10


Access OctoPrint from a web browser on your network by navigating to any of:

http://octopi.local
http://192.168.2.24

https is also available, with a self-signed certificate.

This image comes without a desktop environment installed because it's not
required for running OctoPrint. If you want a desktop environment you can
install it via

sudo /home/pi/scripts/install-desktop

OctoPrint version : 1.4.2
OctoPi version : 0.17.0

pi@octopi:~ $ ls
go_back.py libcoap mjpg-streamer OctoPrint oprint scripts upgrade.py
pi@octopi:~ $ sudo python3 -m pip install requests
[sudo] password for pi:
/usr/bin/python3: No module named pip
pi@octopi:~ $ python3 -m pip install requests
/usr/bin/python3: No module named pip
pi@octopi:~ $ sudo apt update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Get:3 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Get:4 http://archive.raspberrypi.org/debian buster/main armhf Packages [331 kB]
Fetched 13.4 MB in 6s (2,412 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
66 packages can be upgraded. Run 'apt list --upgradable' to see them.
pi@octopi:~ $ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
distro-info-data iso-codes python-apt-common rpi-eeprom-images
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
python3-asn1crypto python3-cffi-backend python3-crypto python3-cryptography
python3-dbus python3-entrypoints python3-gi python3-keyring
python3-keyrings.alt python3-pkg-resources python3-secretstorage
python3-setuptools python3-six python3-wheel python3-xdg
Suggested packages:
python-crypto-doc python-cryptography-doc python3-cryptography-vectors
python-dbus-doc python3-dbus-dbg gnome-keyring libkf5wallet-bin
gir1.2-gnomekeyring-1.0 python-secretstorage-doc python-setuptools-doc
The following NEW packages will be installed:
python3-asn1crypto python3-cffi-backend python3-crypto python3-cryptography
python3-dbus python3-entrypoints python3-gi python3-keyring
python3-keyrings.alt python3-pip python3-pkg-resources python3-secretstorage
python3-setuptools python3-six python3-wheel python3-xdg
0 upgraded, 16 newly installed, 0 to remove and 66 not upgraded.
Need to get 168 kB/1,621 kB of archives.
After this operation, 8,237 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3-six all 1.12.0-1 [15.7 kB]
Get:2 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3-pkg-resources all 40.8.0-1 [153 kB]
Fetched 168 kB in 0s (531 kB/s)
Selecting previously unselected package python3-asn1crypto.
(Reading database ... 47654 files and directories currently installed.)
Preparing to unpack .../00-python3-asn1crypto_0.24.0-1_all.deb ...
Unpacking python3-asn1crypto (0.24.0-1) ...
Selecting previously unselected package python3-cffi-backend.
Preparing to unpack .../01-python3-cffi-backend_1.12.2-1_armhf.deb ...
Unpacking python3-cffi-backend (1.12.2-1) ...
Selecting previously unselected package python3-crypto.
Preparing to unpack .../02-python3-crypto_2.6.1-9+b1_armhf.deb ...
Unpacking python3-crypto (2.6.1-9+b1) ...
Selecting previously unselected package python3-six.
Preparing to unpack .../03-python3-six_1.12.0-1_all.deb ...
Unpacking python3-six (1.12.0-1) ...
Selecting previously unselected package python3-cryptography.
Preparing to unpack .../04-python3-cryptography_2.6.1-3+deb10u2_armhf.deb ...
Unpacking python3-cryptography (2.6.1-3+deb10u2) ...
Selecting previously unselected package python3-dbus.
Preparing to unpack .../05-python3-dbus_1.2.8-3_armhf.deb ...
Unpacking python3-dbus (1.2.8-3) ...
Selecting previously unselected package python3-entrypoints.
Preparing to unpack .../06-python3-entrypoints_0.3-1_all.deb ...
Unpacking python3-entrypoints (0.3-1) ...
Selecting previously unselected package python3-gi.
Preparing to unpack .../07-python3-gi_3.30.4-1_armhf.deb ...
Unpacking python3-gi (3.30.4-1) ...
Selecting previously unselected package python3-secretstorage.
Preparing to unpack .../08-python3-secretstorage_2.3.1-2_all.deb ...
Unpacking python3-secretstorage (2.3.1-2) ...
Selecting previously unselected package python3-keyring.
Preparing to unpack .../09-python3-keyring_17.1.1-1_all.deb ...
Unpacking python3-keyring (17.1.1-1) ...
Selecting previously unselected package python3-keyrings.alt.
Preparing to unpack .../10-python3-keyrings.alt_3.1.1-1_all.deb ...
Unpacking python3-keyrings.alt (3.1.1-1) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../11-python3-pip_18.1-5+rpt1_all.deb ...
Unpacking python3-pip (18.1-5+rpt1) ...
Selecting previously unselected package python3-pkg-resources.
Preparing to unpack .../12-python3-pkg-resources_40.8.0-1_all.deb ...
Unpacking python3-pkg-resources (40.8.0-1) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../13-python3-setuptools_40.8.0-1_all.deb ...
Unpacking python3-setuptools (40.8.0-1) ...
Selecting previously unselected package python3-wheel.
Preparing to unpack .../14-python3-wheel_0.32.3-2_all.deb ...
Unpacking python3-wheel (0.32.3-2) ...
Selecting previously unselected package python3-xdg.
Preparing to unpack .../15-python3-xdg_0.25-5_all.deb ...
Unpacking python3-xdg (0.25-5) ...
Setting up python3-pkg-resources (40.8.0-1) ...
Setting up python3-entrypoints (0.3-1) ...
Setting up python3-dbus (1.2.8-3) ...
Setting up python3-setuptools (40.8.0-1) ...
Setting up python3-xdg (0.25-5) ...
Setting up python3-wheel (0.32.3-2) ...
Setting up python3-six (1.12.0-1) ...
Setting up python3-gi (3.30.4-1) ...
Setting up python3-pip (18.1-5+rpt1) ...
Setting up python3-crypto (2.6.1-9+b1) ...
Setting up python3-asn1crypto (0.24.0-1) ...
Setting up python3-cffi-backend (1.12.2-1) ...
Setting up python3-cryptography (2.6.1-3+deb10u2) ...
Setting up python3-keyrings.alt (3.1.1-1) ...
Setting up python3-secretstorage (2.3.1-2) ...
Setting up python3-keyring (17.1.1-1) ...
Processing triggers for man-db (2.8.5-2) ...
pi@octopi:~ $ python3 upgrade.py
OctoPrint Upgrade to Py 3 (v2.1.11)

Hello!
This script will move your existing OctoPrint configuration from Python 2 to Python 3
This script requires an internet connection and it will disrupt any ongoing print jobs.

It will install the latest version of OctoPrint (1.4.2) and all plugins.
No configuration or other files will be overwritten

Press [enter] to continue or ctrl-c to quit

Detecting system info...
OctoPi version: 0.17.0
Getting OctoPrint version...
OctoPrint version: 1.4.2
Reading installed plugins...
2020-10-17 11:12:58,600 - octolapse.init - INFO - Release mode detected.
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/python2.7/logging/init.py", line 1676, in shutdown
h.close()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/logging/handlers.py", line 32, in close
self._executor.shutdown(wait=True)
AttributeError: 'OctolapseConsoleHandler' object has no attribute '_executor'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/python2.7/logging/init.py", line 1676, in shutdown
h.close()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/logging/handlers.py", line 32, in close
self._executor.shutdown(wait=True)
AttributeError: 'OctolapseConsoleHandler' object has no attribute '_executor'

Plugins installed

  • OctoPrint Ikea Tradfri
  • Firmware Updater
  • PolarCloud
  • OctoPrint-WiFiStatus
  • FileManager
  • Enclosure Plugin
  • Filament Sensor NG
  • RGB Status
  • TouchUI
  • Thingiverse Plugin
  • Bed Visualizer
  • Detailed Progress
  • Simple Emergency Stop
  • Filament Sensors Revolutions
  • Change Filament Plugin
  • Exclude Region
  • Marlin EEPROM Editor
  • PrintTimeGenius Plugin
  • Octolapse
    If there is an error above related to OctoLapse, please ignore, it makes no difference to operation :)
    If you think there is something missing from here, please check the list of plugins in Octoprint
    Press [enter] to continue or ctrl-c to quit

Root access is required to install python3-dev, please fill in the password prompt if shown
Updating package list...
Installing python3-dev...
Use 'sudo apt autoremove' to remove them.
python3-dev is already the newest version (3.7.3-1).

Creating new Python 3 environment...
/usr/lib/python2.7/dist-packages/virtualenv.py:1090: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Successfully created Python 3 environment at /home/pi/oprint

Installing OctoPrint... (This may take a while - Do not cancel!)
Collecting required packages
Installing collected packages
OctoPrint successfully installed!
Required dependency requests is missing... No plugins can be installed
OctoPrint has been installed, but no plugins have

Cleaning up...
Finished! OctoPrint should be ready to go
Once you have verified the install works, you can safely remove the folder /home/pi/oprint.bak
If you want to go back (If it doesn't work) to Python 2 download the file at:
https://raw.githubusercontent.com/cp2004/Octoprint-Upgrade-To-Py3/master/go_back.py
pi@octopi:~ $ python3 go_back.py
OctoPrint upgrade to Python 3: go_back.py (v1.1)
This script will move your old installation back (Just in case!)
Only use it if you have used the upgrade script and it failed
Warning: There have been reports of this script failing, if it fails for you please report it to me as soon as possible. Thanks!
Press [enter] to continue, or ctrl-c to stop

Detected OctoPi installation
Successfully reverted to the old install
Before reverting another failed install you should remove the folder /home/pi/oprintFAIL.bak
pi@octopi:~ $ Required dependency requests is missing... No plugins can be installed

from octoprint-upgrade-to-py3.

cp2004 avatar cp2004 commented on May 27, 2024

After installing pip, you need to install requests. Requests should be preinstalled on OctoPi (it is for everyone else, but maybe something went wrong for you.

Now pip is installed, you can go back and run python3 -m pip install requests, then the script, and it should be OK. Still unsure as to why requests is not installed in the first place.

I will add another pre-flight check that requests exists, and directions to install it, so you don't have to proceed only to find out when it tries to download the plugin repository.

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.