dominicprice / endplay

A suite of tools for generation and analysis of bridge deals. Read the documentation at https://endplay.readthedocs.io
MIT License
21 stars 5 forks source link

pip install endplay failing to build on Kubuntu 24.04, works on 23.10 #43

Open LGTrader opened 1 month ago

LGTrader commented 1 month ago

Possibly this is transitory but it's the more or less the same as ackhh reported in March. I've been using endplay for a month or so on my Kubuntu 23.10 machine with no problems. The machine just went through an update to 24.04 and endplay didn't work with the new 3.12 version of python.

To debug I created two virtual machines in Virtualbox, one 23.10 and the other 24.04. In the 23.10 machine I had no problem installing endplay, but in the 24.04 machine it fails saying it cannot build the wheel. The error messages appear more or less identical to ackhh's messages, so possibly it's going to fix itself in a day or two, but in case it doesn't I thought I should report it.

  copying src/endplay/utils/play.py -> /tmp/pip-install-6bgbldvo/endplay_038aff1216674e8789c732ae36cac310/build/lib.linux-x86_64-cpython-312/endplay/utils
  running build_ext
  cmake /tmp/pip-install-6bgbldvo/endplay_038aff1216674e8789c732ae36cac310 -DCMAKE_INSTALL_PREFIX=/tmp/pip-install-6bgbldvo/endplay_038aff1216674e8789c732ae36cac310/build/lib.linux-x86_64-cpython-312 -DCMAKE_BUILD_TYPE=Release -DSETUPTOOLS_BUILD=1
  CMake Warning:
    Ignoring extra path from command line:

     "/tmp/pip-install-6bgbldvo/endplay_038aff1216674e8789c732ae36cac310"

  CMake Error: The source directory "/tmp/pip-install-6bgbldvo/endplay_038aff1216674e8789c732ae36cac310" does not appear to contain CMakeLists.txt.
  Specify --help for usage, or press the help button on the CMake GUI.
  error: command '/tmp/pip-build-env-616czykb/overlay/bin/cmake' failed with exit code 1
  Traceback (most recent call last):
    File "/home/mark/My_venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()

Thanks in advance

ThorvaldAagaard commented 1 month ago

I think the problem is Python 3.12 - Try downgrading 24.04 to a python version 3.11 - or create a virtual environment with python 3.11

LGTrader commented 1 month ago

Agreed. 3.11 is standard in Kubuntu 23.10 where it works in that VM. After updating my machine I have 3.12 on the machine as a whole, so as a test I created a 24.04.4 VM VM where it got 3.12 by default and fails.

Downgrading my whole machine to 3.11 feels like a step backward that could break Kubunu/Ubuntu stuff so with a Virtualbox VM or a venv virtual environment is preferred.

I'm a newbie programmer and have been using a virtual environment when the system was 3.11-based, but I haven't found instructions that I trust for creating a 3.11 virtual environment on a 3.12 machine so I'm being careful.

ThorvaldAagaard commented 1 month ago

Try looking at https://docs.python.org/3/library/venv.html

You should install 3.11 so you have both, and let the global still be 3.12 but create venv pointing to 3.11

Environments is intended for this

LGTrader commented 1 month ago

OK, at least within the Virtualbox Kubuntu 24.04 environment which has python 3.12 as default I've managed to install python 3.11 and create a venv which runs it. I need to remember how to load python libraries inside of the venv and do some testing of code but so far so good. Thanks!

If I somehow wreck the VM I can start over until I get it right and then do my base machine.

How long does it generally take the maintain/s to update endplay for newer versions of Python? Will there be any announcements?

LGTrader commented 1 month ago

And finally I have it working on my base 24.04 LTS machine in a Python 3.11 virtual environment.

I did add pip3 installs of tkinter and PyQt6 to get plots working. My use of endplay is just to study the statistics of certain bidding sequences my partner and I are considering using.

Anyway, thanks for the help and hopefully they get endplay working under Python 3.12 so no one else has to deal with this.

dominicprice commented 1 month ago

Hi, Sorry, I don’t get to spend as much time maintaining as I would like these days. I will try and have a look into this as soon as I can. Thanks for bringing the issue to my attention :) Dom

LGTrader commented 1 month ago

I completely understand. Not to worry. Thorvald's help got me going with 3.11 so I'm good for now. If you want me to test something in the future, or just verify and update or provide info of what I'm seeing, then let me know.

Cheer

dominicprice commented 1 month ago

version 0.5.9 https://pypi.org/project/endplay/0.5.9/ is up on pypi now, i have tried installing it locally (on ubuntu in a python 3.12 venv) and it seems to install fine now.

if the old version is hanging around but broken, you might need to force it to reinstall as 0.5.9 with pip install --force-reinstall -v "endplay==0.5.9"

let me know if it works :)

LGTrader commented 1 month ago

Thanks. That seems to solve the install issues in a 3.12 virtual environment. It will take a bit longer to verify no regressions but for now all is good.

Cheers!