ekiefl/pooltool

Installing on linux

Closed this issue · 7 comments

Just some quick feedback on my linux install experience of pooltool.

  • Debian 12 installs ok, crashes when run
  • Arch installs ok, runs ok. Works in both Gnome and Xfce desktops and looks fantastic with solid framerate.

I had to use pipx to install and the python version was 3.11

However it is tricky to use with a mouse because unlike MacOS when the mouse leaves the window events are no longer forwarded to the app, and after aiming +/-10 degrees the screen flicks straight again. Similarly when hitting the ball pushing mouse forward it travels out of the window and no shot is played. Same story full screen - mouse events stop at border.

As for using the API I am not experienced with Python enough to say. I believe pipx is not the right method as it is more for executing code. I went on to try python venv approach but still had issue with import not finding pooltool (it could find PoolTool)

ekiefl commented

Debian 12 installs ok, crashes when run

Ok. Any details on the crash?

However it is tricky to use with a mouse because unlike MacOS when the mouse leaves the window events are no longer forwarded to the app, and after aiming +/-10 degrees the screen flicks straight again. Similarly when hitting the ball pushing mouse forward it travels out of the window and no shot is played. Same story full screen - mouse events stop at border.

This also happens with Windows, and @owenhayman just found a workaround (#95). I've updated the README. Could I bother you to try installing via the "Developer" instructions in the README? When you get to step iv, please run the instructions. I think that will fix the problem, but it would be nice to know for certain.

I had to use pipx to install and the python version was 3.11

Interesting. I hadn't heard of pipx before but it sounds like it's the right tool for the job.

Yes the @owenhayman fix works.

I started from a fresh system and ran the following commands to install pooltool on linux

mkdir venv
python -m venv ./venv/
source venv/bin/activate
pip install pooltool-billiards
pip uninstall panda3d -y
pip install --pre --extra-index-url https://archive.panda3d.org/ panda3d
run_pooltool

On linux you cannot install packages system wide in python so you have to create a virtual isolated environment just like conda with python -m venv

Everything works great after that, very nice and I like the keyboard and mouse input system.

These instructions work on debian and arch - both working fine.

ekiefl commented

Ok great, I will update the README. Thanks a lot, this is going to help a lot of people.

ekiefl commented

Sure. Can you please tell me your table, ball, and shot parameters?

I would need table length, table width, ball mass, ball radius, sliding and rolling coefficients, and all Han cushion coefficients. Then I would need your cue angle, cue elevation, English, and your outgoing cue ball speed (or your cue stick mass and cue stick speed if you're using the same ball-stick collision model as me)

ekiefl commented

Since this is off topic from "Installing on linux", I'm gonna move this discussion your issue here: tailuge/billiards#48