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

Using pyenv for Python 3.11 distros #3

Closed
jim3692 opened this issue Jan 3, 2024 · 1 comment
Closed

Using pyenv for Python 3.11 distros #3

jim3692 opened this issue Jan 3, 2024 · 1 comment

Comments

@jim3692
Copy link

jim3692 commented Jan 3, 2024

I tried to use this on Arch Linux, which uses Python 3.11 by default, but I was getting an error in this line:

_libsuinput_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "_libsuinput" + sysconfig.get_config_var("SO")))

This seems to be related with this issue: tuomasjjrasanen/python-uinput#44

My solution was:

  • Install pyenv from here: https://github.com/pyenv/pyenv
  • Download Python 3.10.4 by running pyenv install 3.10.4
  • Set it as default for this project with pyenv local 3.10.4
  • Create a Python Virtual Environment with python -m venv .
  • Install the dependencies in the venv with bin/pip install -r requirements.txt
  • Then run sudo bin/python main.py -p /dev/ttyACM0

After that, the controller was recognized by both jstest-gtk (AUR) and Steam, allowing me to play Liftoff.

@usatenko
Copy link
Owner

usatenko commented Jan 9, 2024

thank you, I will try it on 3.11, will check the Ubuntu's env

@usatenko usatenko closed this as completed Jan 9, 2024
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