Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

raspberry pi zero 2w #13

Closed
zubzero689 opened this issue Apr 12, 2024 · 5 comments
Closed

raspberry pi zero 2w #13

zubzero689 opened this issue Apr 12, 2024 · 5 comments

Comments

@zubzero689
Copy link

now to start off i have this bgcode installed on 3b+ and a 4b i was wanting to free up my 4b with my zero 2w but the plugin wont install no matter how i try. i tried in the UI and it just ends up crashing out and i have to restart the zero 2w i did leave it for over 24 hours when this happened the first time just to make sure it had the time. when i try it thru SSH it errors out
pi@pi-hole-2w:~ $ pip install "https://github.com/jneilliii/OctoPrint-BGCode/archive/master.zip"
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/jneilliii/OctoPrint-BGCode/archive/master.zip
Using cached https://github.com/jneilliii/OctoPrint-BGCode/archive/master.zip
ERROR: Command errored out with exit status 255:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-ze354lxx/setup.py'"'"'; file='"'"'/tmp/pip-req-build-ze354lxx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-kl_w6_y0
cwd: /tmp/pip-req-build-ze354lxx/
Complete output (1 lines):
Could not import OctoPrint's setuptools, are you sure you are running that under the same python installation that OctoPrint is installed under?
----------------------------------------
WARNING: Discarding https://github.com/jneilliii/OctoPrint-BGCode/archive/master.zip. Command errored out with exit status 255: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 255: python setup.py egg_info Check the logs for full command output.

now i have made this zero 2w fully up to date and i still get this error at this point i just think the zero 2w insnt compatable

@jneilliii
Copy link
Owner

jneilliii commented Apr 12, 2024

you can't just run that pip command after logging into SSH. you have to activate OctoPrint's venv first.

source /home/pi/oprint/bin/activate
pip install https://github.com/jneilliii/OctoPrint-BGCode/archive/master.zip

but I'm afraid to tell you that it will probably fail there too if it fails from plugin manager. you're better off just disabling the bgcode format completely in PrusaSlicer.

@zubzero689
Copy link
Author

thanks for the info very helpful i did the above and told me the pip need updating so i did that and now i get stuck on
(oprint) pi@pi-hole-2w:~ $ pip install https://github.com/jneilliii/OctoPrint-BGCode/archive/master.zip
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/jneilliii/OctoPrint-BGCode/archive/master.zip
Downloading https://github.com/jneilliii/OctoPrint-BGCode/archive/master.zip
\ 23.7 kB 851.8 kB/s 0:00:00
Preparing metadata (setup.py) ... done
Collecting pybgcode@ https://github.com/jneilliii/libbgcode/archive/refs/tags/0.2.0.zip (from BGCode==0.2.0)
Downloading https://github.com/jneilliii/libbgcode/archive/refs/tags/0.2.0.zip
/ 475.9 kB 1.8 MB/s 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... /

now i was monitoring resources till it stopped outputting and the ram was almost used up but everything else was normal cpu wasnt at high usage network wasnt ether.
I understand if this plugin wont work on pi zero2w i just wanted people to be aware if they come here.
I also understand if you want to mark this as closed this seems to be the end of the line for now.
thanks for the help again

@jneilliii
Copy link
Owner

The 2w might be running out of memory during the compile process. I think there's a config.txt line you can add to help with that. Will have to dig it up from one of my other plugins that had similar issues with numpy.

@jneilliii
Copy link
Owner

Found it, jneilliii/OctoPrint-BedLevelVisualizer#141 (comment). See if this works. After booting up the pi SSH in and run these commands.

Add additional swap memory

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

remove additional swap memory after installation and rebooting.

sudo swapoff -v /swapfile
sudo rm /swapfile

@zubzero689
Copy link
Author

thank you again it all is working right now as intended

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

No branches or pull requests

2 participants