-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] Add numpy to octoprint virtualenv #676
Comments
All those dependencies take a fair amount of space. This is something AFAIK you do once per-install, and only a small subset of people will actually install this. Meaning you are shipping a huge amount of bits no one will use. What we can do is add an install script. I am closing this and will help with directions for a variant, unless you can give me a better reason why. |
With Bed Level Visualizer at nearly 19,000 installs based on the stats I think it might be beneficial to the community over all. That's almost 20% of the known OctoPrint user base. |
@foosel any thoughts? |
In principle fine with me, but I'm not so sure it will be as big of a point of frustration with 0.18 as it was so far. The thing is, right now numpy has to be compiled on all instances that need it for one plugin or another. Same btw with PIL. 0.18 ships with a Py3 venv however. Which means we can (and automatically will) finally make use of piwheels which offers all these packages precompiled:
Which makes this take around 20s... |
Fair point @foosel but I have seen where those apt dependencies still have to be installed for python 3 installed version to work. |
@jneilliii When you say "I have seen where those apt dependencies still have to be installed for python 3" - Does that include OctoPi 0.18 nighlty from here?: https://gnethomelinux.com/OctoPi/nightly/ |
That's indeed the question. The install quoted above was done against an 0.18 nightly from two weeks or so back that I still had flashed on one of my test Pis. No additional setup that I can think of. However, I haven't confirmed if it works as expected or not, that should be done by someone who has used numpy enough to judge that. |
Ah, I just checked piwheels and I see that the latest 1.19.2 version is now successful. I think when I was testing this before that version wasn't compiling successfully on piwheels and therefore was downloading and compiling fresh. I will reflash octopi nightly and verify now. |
Cool, update if this solves the problem |
Ok, so just was able to flash the nightly 0.18 from last night and install the Bed Level Visualizer plugin and although numpy does install quickly now thanks to piwheels.org and python 3 the required apt dependencies still cause errors. This is the specific error I get after install and the plugin does not load.
After looking into that link, specifically here it appears their are two options for this; either |
Using the numpy from Raspbian won't work as we don't use the system wide packages but rather the venv, and system wide had caused tons of issues with compatibility in the past. So I vote for including the libatlas dependency and solve this that way. |
The error says:
So you don't need the |
Numpy docs say to install the Which depends not on
Unsurprisingly so because it actually does contain the missing
But the
Checking the dependencies of the
So that one apparently depends on
but not by
So based on that I'd say that yes, numpy only needs |
@foosel Where do you see that in the docs? I can't see it. |
Ok this page: I would say that |
I appreciate it Guy. That will definitely save me some headaches with support issues in the future. I'll grab the nightly tomorrow after this builds and verify everything is working as expected. |
That line came from users with raspbian saying that it solved their issue, it seems indeed like a good idea to drop the |
@guysoft I'm not so sure this is resolved. I just installed 2020-10-07_2020-08-20-octopi-buster-armhf-lite-0.18.0 from the nightly builds and I'm still having the same issue. Is this change already part of the nightly builds because the filename after extraction |
I use the nighties at http://unofficialpi.org/Distros/OctoPi/nightly/ or http://unofficialpi.org/Distros/OctoPi/nightly-arm64/. Last build adds this in the build log:
Also says:
The reason is that the build you provided has no build date, so I don't know if its old or new |
Thanks Guy. Not sure why the previous download I got from the other site that went down recently didn't work as expected. The one named "2020-10-22_2020-08-20-octopi-buster-armhf-lite-0.18.0" from this site seems to work perfectly. I really appreciate you adding that. |
What were you doing?
Installing the Bed Level Visualizer plugin, and I believe also the Prusa Mesh Map plugin numpy has to download and compile, which takes forever on some older devices as well as smaller memory devices.
What did you expect to happen?
This is expected behavior, but would like to improve the user experience.
What happened instead?
The plugin took forever to install.
Did the same happen when running OctoPrint in safe mode?
N/a
Version of OctoPi
0.17
Printer model & used firmware incl. version
N/A
Screenshot(s)/video(s) showing the problem:
N/A
Request is to include the numpy compile ahead of time so it's already available on the system for any plugin to utilize without having to compile. I believe octopi 0.18 already has the necessary pre-requisites installed for numpy compiling, but to be sure the programs outside of the virtualenv that are required can be installed with the command below for the python 3 requirements.
sudo apt install libgfortran5 libatlas3-base libatlas-base-dev
and then the command to install numpy is within the virtualenv of octoprint
source ~/oprint/bin/activate
pip install numpy
I have read the FAQ.
The text was updated successfully, but these errors were encountered: