-
Notifications
You must be signed in to change notification settings - Fork 308
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
No module named 'blessed' #660
Comments
so I ran the instructions from pibuilder and logged back in running the menu
note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while trying to install package. note: This is an issue with the package mentioned above, not pip. How weird :-/ |
Maybe some basic info like your hardware, Perhaps also try this. I really have no idea what's going on. I don't understand this Python venv thing (conceptually, yes, tech details, no) but it seems to be the root cause of many problems. |
I've been using bookworm for months without issue... pi@Europa:~/IOTstack $ uname -a |
Just to confirm, I ran the reset script (my first suggestion) on my own system and it didn't chuck up the same error as you got so either (a) it was a transient problem, in which case trying again might help, or (b) it's something peculiar about your system which is causing it. I don't ever recall seeing compiler involvement let alone include errors or mentions of ruamel.yaml.clib. Weird. |
Shows you how little I know - "bookworm" - never heard of it until this moment. Googling finds hits in 2021. Must've been living under a rock. What hardware? |
8gb raspberry pi4 |
We're at the limits of my knowledge. I usually try to treat the symptoms. On your system it's moaning about trying to install ruamel.yaml.clib. On my Bullseye system:
So, I just installed Maybe see if making the library available will solve the problem on Bookworm. Other than that, serious "dunno". Sorry. |
I wonder if it's related to it not being a stable build and they have broke something reacently - I used bookworm on another pi and installed powerline shell as part of that. After a recent update, the update broke that shell too and I had to reinstall the app to fix it. pi@Europa:~/IOTstack $ apt list ruamel.yaml.clib python3-ruamel.yaml.clib I use a heavily modified docker-compose file that I write manually, I used IOTstack just to start stop / update containers etc I'll go back to using the docker commands manually and see if the next set of updates or so fixes it again \o/ Thank you for having a look! |
Just to add - all my installs using bookworm on arm fail this - I recently installed linux mint and using the defaults this installed fine - bookworm is still int testing but I suggest you look into this. INFO: Running under normal user some features may not work.
pi@Europa:~ $ cd IOTstack/
Existing installation detected. × python setup.py bdist_wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Running setup.py install for ruamel.yaml.clib did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while trying to install package. note: This is an issue with the package mentioned above, not pip. |
Perhaps see if this helps. |
Sorry - just to clarify Paraphraser - this appears to be an issue with either a change or something to debian or python - I'm going to double check but I'm pretty sure it will do this with a fresh bullseye install that has been updated to bookworm - I don't think it's an IOTstack issue,. more than it being a headsup of what's around the corner. pi@Europa:~ $ git -C ~/PiBuilder pull origin master
Ensuring apt directories are up-to-date... Reinstalling apt dependencies... Running kernel seems to be up-to-date. Failed to check for processor microcode upgrades. Restarting services... No containers need to be restarted. User sessions running outdated binaries: No VM guests are running outdated hypervisor (qemu) binaries on this host. Uninstalling pip dependencies... × This environment is externally managed
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. × This environment is externally managed
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. × This environment is externally managed
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. × This environment is externally managed
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. × This environment is externally managed
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. × This environment is externally managed
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. Satisfying menu requirements... × This environment is externally managed
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. Erasing any pre-existing virtual environment |
**Soooooooooooooooooo I installed bullseye on pi 4 4GB and upgraded to bookworm - I then installed IOTstack from github and went through the whole process. Effectively I'm still having the same issues. I believe it's debian or python imposing much more restrictive limitations on how pip performs -- but unless your scripts are doping something extra dangerous -- I really don't think there is much that can be done - So I'm posting this more as an FYI rather than something that can be easily fixed.**
|
And just as an additional - here is an attempt to install commanderpi with similar results Anyway I'm leaving this here is a warning or a headsup to others - I really don't think there is a simple solution
|
So, what happens if you switch to the old-menu branch in IOTstack and try to run the "old menu"? Maybe that's a workaround for someone who wants to run Bookworm + IOTstack. These days, the only real difference between the two is some service definitions still use environment files in the services directory. Networking (which used to be a big difference) is harmonised. There's no good reason to pick old or new. |
I changed my production stack install to the old menu and it's working fine. Never thought of doing that before - but as I now only use iot stack for the handy menu and manually code the compose file myself - this is a great work around for me =) I'm just surprised more people are not getting trapped in this, it's like since bookworm they have suddenly enforced dependency rules -- and I don't want to override it by default. ` note: This error originates from a subprocess, and is likely not a problem with pip. × Running setup.py install for ruamel.yaml.clib did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while trying to install package. note: This is an issue with the package mentioned above, not pip. ah well, I'll revisit again another time - but thanks for your thoughts and for giving me work around |
So I think I finally got to the bottom of these errors - but I've no idea when it was added as for a good 6 months it worked great https://www.debian.org/releases/bookworm/arm64/release-notes/ch-information.en.html#python3-pep-668 5.2.2. Python Interpreters marked externally-managed The Debian provided python3 interpreter packages (python3.11 and pypy3) are now marked as being externally-managed, following PEP-668. The version of python3-pip provided in Debian follows this, and will refuse to manually install packages on Debian's python interpreters, unless the --break-system-packages option is specified. If you need to install a Python application (or version) that isn't packaged in Debian, we recommend that you install it with pipx (in the pipx Debian package). pipx will set up an environment isolated from other applications and system Python modules, and install the application and its dependencies into that. If you need to install a Python library module (or version) that isn't packaged in Debian, we recommend installing it into a virtualenv, where possible. You can create virtualenvs with the venv Python stdlib module (in the python3-venv Debian package) or the virtualenv Python 3rd-party tool (in the virtualenv Debian package). For example, instead of running pip install --user foo, run: mkdir -p ~/.venvs && python3 -m venv ~/.venvs/foo && ~/.venvs/foo/bin/python -m pip install foo to install it in a dedicated virtualenv. See /usr/share/doc/python3.11/README.venv for more details. |
Just as an FYI - I accidently hosed my OS trying to update from bookworm to trixie on the pi4 So copied everything I need off and I'm currently in the process of going back to bookworm. As bookworm is about to get released officially for Pi in the next month or two - I just want to highlight this issue once more. I'm pretty sure it's something to do with how the virtual environment is configured for IOTstack but I'm still getting the same error with a brand new install of bullseye and then a straight upgrade to bookworm - so this issue is getting closer and closer to mainstream users. Just a heads up though You should now restart your system Broadcast message from root@Europa on pts/1 (Sun 2023-07-02 14:09:56 BST): The system will reboot now! pi@Europa:~ $ [SSH] INFO: DISCONNECT [SSH] Server Version OpenSSH_9.2p1 Debian-2 Linux Europa 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 The programs included with the Debian GNU/Linux system are free software; Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
Creating python virtualenv for menu... × python setup.py bdist_wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Running setup.py install for ruamel.yaml.clib did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while trying to install package. note: This is an issue with the package mentioned above, not pip. |
The underlying cause of the problem reported in SensorsIot#660 is the Python requirements files containing pins for (almost) every line item. I appreciate that pinning is what happens by default when requirements files are generated but some of the pinned versions which might have been appropriate for Bullseye when the files were generated will not actually install on Bookworm. This Pull Request removes pins from every line item in each requirements file. In other words, the defaults will become the latest and greatest for each system (Buster or Bullseye or Bookworm). I have tested this on Bullseye and Bookworm (but not Buster), and only to the extent of confirming that each listed package gets installed and the menu doesn't chuck up any complaints. The test systems were built with [PiBuilder](https://github.com/Paraphraser/PiBuilder). **IF** we encounter a problem which needs to be solved by pinning a package to a specific version, we will have to sort out how to do that across OS releases. Fixes: SensorsIot#660 Signed-off-by: Phill Kelley <[email protected]>
I think I have found the cause. See #723 for the explanation. I have also added some modifications to PiBuilder to support Bookworm. See the PiBuilder Change Log for the details. Here's a Pi 4 happily running IOTstack on Bookworm: Bookworm.movBy the way, this line in your output troubles me:
I think of that "+dfsg1" as the signature of an incorrect installation of
For some reason, using I'm aware that both The correct way to install The version of On a number of occasions I've thought about preparing a pull request to try to fix the IOTstack scripts. Each time I've thrown up my hands in horror and decided that I really don't need either the headache of trying to sort it out, or the (implied) responsibility for future maintenance. I'm already doing PiBuilder and I reckon that's enough. |
pi@Europa:~/IOTstack $ ./menu.sh
Checking for project update
From https://github.com/SensorsIot/IOTstack
Project is up to date
Python virtualenv found.
Python Version: 'Python 3.11.1'. Python and virtualenv is up to date.
Please enter sudo pasword if prompted
Command: docker version -f "{{.Server.Version}}"
Docker version 20.10.23+dfsg1 >= 18.2.0. Docker is good to go.
Project dependencies up to date
Existing installation detected.
Using existing python virtualenv for menu
Traceback (most recent call last):
File "/home/pi/IOTstack/./scripts/menu_main.py", line 2, in
from blessed import Terminal
ModuleNotFoundError: No module named 'blessed'
Just wondering if anyone has came across this? I tried to install blessed with pip3 install blessed and it says it's installed but still does this?
The text was updated successfully, but these errors were encountered: