Skip to content
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

Installation Hangs with "Running setup.py install for numpy: started" #141

Closed
xenon2008 opened this issue Jul 6, 2019 · 24 comments
Closed

Comments

@xenon2008
Copy link

Hello together!

I want to install Bed Visualizer for the first time on my Octopi (latest Version), but the installation always hangs on "Running setup.py install for numpy: started"

What can i do?
Tried it 2-3, but every try the same error ... i must reboot Octopi via SSH so that was working again...

Sorry for my Bend English, i am a German User with terrible English Skills

@jneilliii
Copy link
Owner

Check this post and see if this works for you for installing the numpy requirement.

#81 (comment)

@xenon2008
Copy link
Author

is there no other "official" solution?

@jneilliii
Copy link
Owner

If you can't get numpy to install then the newer version won't work for you. The only other option would be to install the last version prior to the numpy integration which doesn't support all firmware. Once installed you can't upgrade otherwise you'll get the same error. To install the old version use the following url in plugin manager.

https://github.com/jneilliii/OctoPrint-BedLevelVisualizer/archive/0.1.2.zip

@stale
Copy link

stale bot commented Jul 21, 2019

This issue has been automatically marked as stale because it has not had activity in 14 days. It will be closed if no further activity occurs in 7 days.

@stale stale bot added the stale label Jul 21, 2019
@stale stale bot closed this as completed Jul 28, 2019
@saikek
Copy link
Contributor

saikek commented Oct 15, 2019

Issue happens on low memory machines.

Installation on machine with memory < 512 MB.

If Your Octoprint is installed on machine with 256 MB of ram ( for example Quad Core Orange PI Zero with 256MB RAM ) - you installation could fail during numpy compilation. Your memory and swap would be 100% full as well as all CPU's. One of the solution is to temporary increase swap size for the installation:

Adding extra swap file:

sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

this would create 1GB temporary swap file that can be used during installation. You can remove it after reboot.

Removing extra swap:

sudo swapoff -v /swapfile
sudo rm /swapfile

@jneilliii
Copy link
Owner

Can you include instructions on how to remove the swapfile prior to me accepting the pull request?

@saikek
Copy link
Contributor

saikek commented Oct 16, 2019

Sure, updated comment above

@gasrovescio
Copy link

pi@octopi:~ $ swapoff -v /swapfile
swapoff /swapfile
swapoff: Not superuser.
pi@octopi:~ $ rm /swapfile
rm: remove write-protected regular file '/swapfile'? s
pi@octopi:~ $ swapoff -v /swapfile
swapoff /swapfile
swapoff: Not superuser.

WHY ?

@jneilliii
Copy link
Owner

Maybe you need to sudo those commands? I'm not sure because I've never used a low memory device.

sudo swapoff -v /swapfile
sudo rm /swapfile

@gasrovescio
Copy link

to be more precise I use the Putty program to access Raspberry, then enter name (PI) and password (raspberry), then copy and paste these two command lines and I press enter, but writes that I am not a superuser.

@saikek
Copy link
Contributor

saikek commented Jan 30, 2020

Yes, you need root permissions for that, use sudo before command.

@gasrovescio
Copy link

sorry but I don't understand, after logging in I copy and paste the command ( sudo swapoff -v /swapfile
sudo rm /swapfile ) directly and press enter, what am I wrong?

@saikek
Copy link
Contributor

saikek commented Jan 30, 2020

Depending on what you want to do - disable swap after installation ? (since this 2 commands are meant to disable extra swap only).

You login to machine, paste command one by one and press enter after each one so it would be consumed by mighty ssh server.

@rgauny
Copy link

rgauny commented Nov 16, 2020

Shouldnt this use piwheels?

@jneilliii
Copy link
Owner

It does in a python 3 environment, but piwheels doesn't have python2 version compiled.

@hyreto
Copy link

hyreto commented Dec 12, 2020

Hi, it stopped always at the same state. anyone a solution? i have a raspi 3B

Stored in directory: /tmp/pip-ephem-wheel-cache-M7k4dA/wheels/42/13/55/6c52a13f5f081fda60bf4ef6dfb543143e9b07062badc41152
Building wheel for numpy (setup.py): started
Building wheel for numpy (setup.py): still running...
Building wheel for numpy (setup.py): still running...
Building wheel for numpy (setup.py): still running...
Building wheel for numpy (setup.py): still running...
Building wheel for numpy (setup.py): still running...

@jneilliii
Copy link
Owner

Are you installing on a pi 3b or pi 4? I recommend upgrading to python 3 using the script by @cp2004 then run sudo apt install libatlas3-base and then install the plugin. That way numpy doesn't have to compile.

@skopy123
Copy link

installer is still broken. I am running octoprint o raspberry pi 3A. I updated to latest version of octoprint (1.5.2 stable) and instalation get stuck on "Building wheel for numpy (setup.py): still running...". I never touch swap settings etc. I am not much familiar with python and I have no idea what is piwheels, please consider to modify install script of your plugin to sort out this hasle and allow instalation without problem.

@cp2004
Copy link

cp2004 commented Dec 28, 2020

How long has it been stuck for? The installation is not designed to not work...

It can take over 1/2 an hour, maybe longer. On Python 3, the process is near instant since there is a precompiled wheel available.

@jneilliii
Copy link
Owner

jneilliii commented Dec 28, 2020

The 3A's memory footprint is the issue here. There are some users that have reported upping their memory block helped to get it installed, but I personally would upgrade your octoprint instance to python 3 and the install doesn't have to compile numpy then. Use the instructions here to upgrade. If you want to you can try increasing the swap memory with these steps.

#141 (comment)

@Joonch
Copy link

Joonch commented Jan 11, 2021

Tip: Don't use python3 -v to check the version (newbie mistake; I'm not comfortable with Linux skills yet). Press the settings wrench, press system info, and scroll down to env.python.version:. I thought I was screwed because python reported that it was on version 3 through PuTTY because @cp2004 said the numpy wheel installation would be instant if you were on python version 3 but mine was taking forever and I thought the compilation was hanging. But upon checking, the actual Octopi environment version was 2.7.16. That was why it was taking so long. So I had to wait about 15 minutes for it to compile but it eventually finished.
Info:
browser.user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 connectivity.connection_check: 8.8.8.8:53 connectivity.connection_ok: true connectivity.enabled: true connectivity.online: true connectivity.resolution_check: octoprint.org connectivity.resolution_ok: true env.hardware.cores: 4 env.hardware.freq: 1200 env.hardware.ram: 917016576 env.os.bits: 32 env.os.id: linux env.os.platform: linux2 env.plugins.pi_support.model: Raspberry Pi 3 Model B Rev 1.2 env.plugins.pi_support.octopi_version: 0.17.0 env.plugins.pi_support.throttle_state: 0x0 env.python.pip: 19.3.1 env.python.version: 2.7.16 env.python.virtualenv: true octoprint.safe_mode: false octoprint.version: 1.5.2 printer.firmware: Marlin Ver 1.70.2 BL (Creality3D)

@HamidMandi
Copy link

Issue happens on low memory machines.

Installation on machine with memory < 512 MB.

If Your Octoprint is installed on machine with 256 MB of ram ( for example Quad Core Orange PI Zero with 256MB RAM ) - you installation could fail during numpy compilation. Your memory and swap would be 100% full as well as all CPU's. One of the solution is to temporary increase swap size for the installation:

Adding extra swap file:

sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

this would create 1GB temporary swap file that can be used during installation. You can remove it after reboot.

Removing extra swap:

sudo swapoff -v /swapfile
sudo rm /swapfile

It works for me perfectly. I installed NumPy on an Allwinner A20. It takes about a half-hour but finally done!

@D4koon
Copy link

D4koon commented Dec 29, 2022

A possible solution could be to use piwheels

pip3 install numpy -i https://www.piwheels.org/simple

@jneilliii
Copy link
Owner

piwheels by default is already added to the available wheels, so it should find it, but that's a moot point since the numpy dependency was removed in newer versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests