entrippy / OctoPrint-OctoHue

Illuminate your print job and signal its status using a Philips Hue lights.
GNU Affero General Public License v3.0
18 stars 4 forks source link

Python 3 support #41

Closed harryslapalot closed 9 months ago

harryslapalot commented 3 years ago

Since Python 2 is EOL since January 1st 2020 it would be nice if Octohue supported Python 3. I just migrated my Octoprint Instance to Python 3 and it seems OctoHue is the only plugin I am using that doesn't support it. If it is already compatible, Octoprint must be told that it is. See here for guidance:

Migrating to Python 3

harryslapalot commented 3 years ago

I was able to fix this issue by running sudo apt-get install libatlas-base-dev and then reinstalling OctoHue. Before it always showed "Installed UNKNOWN" after installation and the plugin wasn't there after reboot.

BigWebstas commented 10 months ago

^^ this doesnt seem to work anymore ^^ any thoughts?

BigWebstas commented 10 months ago

I have installed libatlas-base-dev but it still shows unknown and doesnt seem to install it, i have fully rebooted the pi as well image

image

Lefo16 commented 9 months ago

I too have the same issue!

I did do the sudo apt-get install libatlas-base-dev

Hope there is a fix

entrippy commented 9 months ago

@BigWebstas @Lefo16 , I'm doing a fresh octopi install right now and I'll be doing. from scratch install of octohue as a part of that.

If there is anything specific you think i need to know to reproduce the issue let me know, alternatively, this was using an new install for you?

entrippy commented 9 months ago

On my clean install I did find a package that numpy expected to be there that was missing... in ~/.octoprint/logs/octoprint.log i found the following:

2023-12-04 21:19:16,172 - octoprint.plugin.core - ERROR - Error loading plugin octohue Traceback (most recent call last): File "/home/pi/oprint/lib/python3.9/site-packages/numpy/core/init.py", line 24, in from . import multiarray File "/home/pi/oprint/lib/python3.9/site-packages/numpy/core/multiarray.py", line 10, in from . import overrides File "/home/pi/oprint/lib/python3.9/site-packages/numpy/core/overrides.py", line 8, in from numpy.core._multiarray_umath import ( ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

It was fixed with apt-get libopenblas-dev

I will take a closer look and see if I can get around the use of numpy, its being a little troublesome. But It wont be replaced quickly

Lefo16 commented 9 months ago

On my clean install I did find a package that numpy expected to be there that was missing... in ~/.octoprint/logs/octoprint.log i found the following:

2023-12-04 21:19:16,172 - octoprint.plugin.core - ERROR - Error loading plugin octohue Traceback (most recent call last): File "/home/pi/oprint/lib/python3.9/site-packages/numpy/core/init.py", line 24, in from . import multiarray File "/home/pi/oprint/lib/python3.9/site-packages/numpy/core/multiarray.py", line 10, in from . import overrides File "/home/pi/oprint/lib/python3.9/site-packages/numpy/core/overrides.py", line 8, in from numpy.core._multiarray_umath import ( ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

It was fixed with apt-get libopenblas-dev

I will take a closer look and see if I can get around the use of numpy, its being a little troublesome. But It wont be replaced quickly

this solution works. thank you!

entrippy commented 9 months ago

Great to hear. I've looked in to removing numpy, and its not straight forward, there is a bit of a dependency chain as the module used for colour conversion relies on it.

For now I'll document that libopenblas-dev needs to be installed in the readme and will continue to research workarounds.

entrippy commented 9 months ago

oh... might have figured out how to drop numpy and colourmath all in one go.

Needs some testing though

entrippy commented 9 months ago

Has been resolved in the coming 0.7.0. this release might take some time due to a large number of other optimisations.