Provide Python bindings as a package.#1856
Conversation
|
Any way to customize the lc0 build parameters? |
I haven't tested it yet, but according to the docs, this could be achieved via |
|
An example of how this PR can be useful for other Python packages (that can depend on the package Putting |
(cherry picked from commit 6df87ad)
|
@ddobbelaere which prerequisites does one need for this to work? Because I get this when running pip install --user git+https://github.com/LeelaChessZero/lc0.git.
|
|
@hwuebben You should have a recent C++ compiler installed to build lc0 from sources. It might be a good idea to verify if that works first. Apart from that, looking at the full logs as indicated by pip is another way to proceed. |
|
I'm having some trouble understanding how this works. I followed the instructions to the best of my knowledge. When I run "pip show lczero-bindings", I get the same output you did, with the long GNU license. |
|
@LilacPeregrine I don't really know (not a Mac user either). Here are some suggestions:
python -m venv venv
source venv/bin/activate
python -m pip install git+https://github.com/LeelaChessZero/lc0.git
python -c "import lczero.backends" # Should work
deactivate
Good luck. Maybe the lc0 Discord is also a better place to discuss these things further. |
|
@ddobbelaere However, it works now, if I run it through python3.11 "name of file.py" |
|
I'm experiencing the same issue as @ukrainec45 |



This PR makes the Python bindings (introduced by #1261) available as a pip-installable package. The compactness (addition of a single
pyproject.toml) can be completely attributed to leveraging of the neatmeson-pythonbuild backend (maintained by the official Meson team).Example usage: