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 on bookworm #94

Closed
wihrl opened this issue Dec 7, 2024 · 3 comments
Closed

Installation on bookworm #94

wihrl opened this issue Dec 7, 2024 · 3 comments

Comments

@wihrl
Copy link

wihrl commented Dec 7, 2024

Hi, I ran into trouble during installation with pip:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    For more information visit http://rptl.io/venv

I fixed this by installing the requirements manually using: sudo pip3 install -r $HOME/bthidhub/requirements.txt --break-system-packages

After this the project worked fine without mypyc, but was extremely slow - so i ran mypyc on it and now remapper.py no longer starts up:

× remapper.service - Remapper
     Loaded: loaded (/lib/systemd/system/remapper.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Sat 2024-12-07 12:53:23 CET; 1min 2s ago
   Duration: 1.638s
    Process: 464 ExecStart=/usr/bin/python3 /home/pi/bthidhub/remapper.py (code=exited, status=1/FAILURE)
    Process: 465 ExecStartPost=/usr/bin/bash -c echo none > /sys/class/leds/ACT/trigger (code=exited, status=0/SUCCESS)
    Process: 480 ExecStopPost=/usr/bin/bash -c echo heartbeat > /sys/class/leds/ACT/trigger (code=exited, status=0/SUCC>
   Main PID: 464 (code=exited, status=1/FAILURE)
        CPU: 888ms

Dec 07 12:53:22 bthidhub python3[464]: Traceback (most recent call last):
Dec 07 12:53:22 bthidhub python3[464]:   File "/home/pi/bthidhub/remapper.py", line 10, in <module>
Dec 07 12:53:22 bthidhub python3[464]:     from adapter import BluetoothAdapter
Dec 07 12:53:22 bthidhub python3[464]:   File "adapter.py", line 11, in <module>
Dec 07 12:53:22 bthidhub python3[464]:     from agent import Action, Agent
Dec 07 12:53:22 bthidhub python3[464]:   File "agent.py", line 14, in <module>
Dec 07 12:53:22 bthidhub python3[464]:     device: dt.ObjPath
Dec 07 12:53:22 bthidhub python3[464]: KeyError: 'ObjPath'
Dec 07 12:53:23 bthidhub systemd[1]: remapper.service: Main process exited, code=exited, status=1/FAILURE
Dec 07 12:53:23 bthidhub systemd[1]: remapper.service: Failed with result 'exit-code'.

Any ideas on what could be causing this? Maybe a wrong package version?

EDIT: I'm using a pi zero 2 w with 32 bit Pi OS Lite Bookworm from 24-11-19 (via rpi imager)

@wihrl
Copy link
Author

wihrl commented Dec 7, 2024

Ok, i got it to work by downgrading mypy: sudo pip3 install mypy==1.10.1 --break-system-packages
But not sure if it actually compiled anything since it still pegs 1 core to 100% all the time and works really slowly.

@Dreamsorcerer
Copy link
Collaborator

I think the last update was for bullseye, so I think we need to retest and upgrade the installation for bookworm.

@Dreamsorcerer Dreamsorcerer changed the title Installation / mypyc ObjPath compatibility issues Installation on bookworm Dec 8, 2024
@Dreamsorcerer
Copy link
Collaborator

Done. Bookworm installation will work now.

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

2 participants