MarkSlat / OctoPrint-Hologram

A simple OctoPrint plugin to display a render based on the preloaded G-code.
GNU Affero General Public License v3.0
7 stars 1 forks source link

Will not install via Repository (or manual pip commands) #1

Open opjose opened 3 months ago

opjose commented 3 months ago

When installed via Octoprint the following message appears

"Plugin management log Install Unknown: "

But the installation shows completed.

The plugin never appears.

The install log displays:

Installing plugin "OctoPrint-Hologram" from https://github.com/MarkSlat/OctoPrint-Hologram/archive/main.zip... /home/pi/oprint/bin/python -m pip --disable-pip-version-check install file:///tmp/tmpm9x2zwb9/OctoPrint-Hologram-main.zip --no-cache-dir Building wheels for collected packages: OctoPrint-Hologram Building wheel for OctoPrint-Hologram (setup.py): started Building wheel for OctoPrint-Hologram (setup.py): finished with status 'done' Created wheel for OctoPrint-Hologram: filename=OctoPrint_Hologram-1.1.0-py3-none-any.whl size=35690 sha256=e5e589f5d530c8b88046acf236a1999dead73ce91acf638c33a2126e89560990 Stored in directory: /tmp/pip-ephem-wheel-cache-z2c3qlk0/wheels/e0/54/dc/6e60e80f6aa06bc9677c72e55e268186d425b08ed63aa04d00 Successfully built OctoPrint-Hologram Installing collected packages: OctoPrint-Hologram Attempting uninstall: OctoPrint-Hologram Found existing installation: OctoPrint-Hologram 1.1.0 Uninstalling OctoPrint-Hologram-1.1.0: Successfully uninstalled OctoPrint-Hologram-1.1.0 Successfully installed OctoPrint-Hologram-1.1.0 Done!

MarkSlat commented 3 months ago

I will look into it 👍

Martin-Ox commented 3 months ago

I had the same issue. But ... I'd forgot to install Numpy :-) After that, no problem. But ... you have to be patient. It takes a while (over 20 mins) to install all requirements. And I use a Rpi4 with 8Gb.

opjose commented 3 months ago

I had the same issue. But ... I'd forgot to install Numpy :-) After that, no problem. But ... you have to be patient. It takes a while (over 20 mins) to install all requirements. And I use a Rpi4 with 8Gb.

Thanks but all of the prerequisites were installed properly including Numpy. It is visible in the log.

I am using a RPI3 4GB with the recent OctoPi release that I installed about six months ago or less.

jneilliii commented 3 months ago

Have you guys tried installing the current required system dependency for numpy? I think the one listed for libopenblas0-base changed with one of the recent releases.

SSH to the pi and run the following command.

sudo apt install libgfortran5 libopenblas0-pthread

then afterwards try this

source ~/oprint/bin/activate
pip install --force-reinstall --no-cache-dir numpy
deactivate

then try re-installing the plugin.

opjose commented 3 months ago

Have you guys tried installing the current required system dependency for numpy? I think the one listed for libopenblas0-base changed with one of the recent releases.

SSH to the pi and run the following command.

sudo apt install libgfortran5 libopenblas0-pthread

then afterwards try this

source ~/oprint/bin/activate
pip install --force-reinstall --no-cache-dir numpy
deactivate

then try re-installing the plugin.

Brilliant!

That was the issue!

Could the installer be adjusted to take care of this automatically?

jneilliii commented 3 months ago

Unfortunately it's not really possible to automatically install system dependencies from a plugin install.

opjose commented 3 months ago

Thanks.

It is working fine now after doing what you said.

Kudos.

MarkSlat commented 3 months ago

Thanks @jneilliii I am not sure is there a better way to do it other than having to SSH in and install it manually. I might leave this thread open to help other people.

jneilliii commented 3 months ago

I lobbied to get the previous system dependencies added to OctoPi a while back for being able to build numpy without issue. Probably best way would to pin the numpy version to an older one that uses libopenblas0-base. Doing a quick look on piwheels.org it seems that this was swapped in version 1.26, so using numpy<=1.25.2 in plugin_requires might do the trick.

subworx commented 3 months ago

after trying to install the plugin through octoprint, then apt installing the packages mentioned here and in the docs, and finally running pip to reinstall numpy, i got the following output:

octoprint-hologram 1.1.0 requires matplotlib, which is not installed. octoprint-hologram 1.1.0 requires scikit-image, which is not installed. octoprint-hologram 1.1.0 requires scipy, which is not installed. octoprint-hologram 1.1.0 requires seaborn, which is not installed.

matplotlib, scipy and seaborn installed fine and quickly.

but on my crappy raspi 3b (plus?) building scikit-image took forever and only succeeded once i increased the swap fille from 100 MB to 2 GB. It used to be stuck on "Preparing metadata (pyproject.toml)", now it finished after about 30 minutes.

After all of this, the plugin finally loads.

MarkSlat commented 3 months ago

I will work on an update to try and reduce the dependency list and see if the previous version of numpy works so the user does not have to SSH when installing on a raspberry pi. I am just on holidays at the moment so I haven't had much of a chance of working on the code. I should have an update pushed out early next week though.

plduganaman commented 2 months ago

Screenshot 2024-06-18 195943

I get this error during the installation. I did the above commands before trying the install. It does appear to have installed however. Now I realize the camera's field of view isn't wide enough to include the entire bed. :(

MarkSlat commented 2 months ago

At least it is working, I would like to have an update to allow beds larger than the frames but I am just not finding the time at the moment unfortunately.