pygloo icon indicating copy to clipboard operation
pygloo copied to clipboard

Failure to build for Python 3.11

Open terraflops1048576 opened this issue 1 year ago • 13 comments

Hi, I'm trying to build this for Python 3.11. I would much rather have a wheel for amd64 linux, but I see that the wheels on PyPI are very outdated (no 3.9, 3.10, 3.11, 3.12).

I cloned the repository, installed bazelisk, and ran: bazel build --verbose_failures //pygloo:all

only to get the errors:

-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Enabling sccache for CXX
-- Enabling sccache for C
-- Gloo build as STATIC library
-- Found hiredis: /home/pwang/.cache/bazel/_bazel_pwang/dd910acb7981bd836359cbca7e775295/sandbox/linux-sandbox/5/execroot/_main/bazel-out/k8-fastbuild/bin/pygloo/gloo.ext_build_deps/hiredis/include/hiredis
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pwang/.cache/bazel/_bazel_pwang/dd910acb7981bd836359cbca7e775295/sandbox/linux-sandbox/5/execroot/_main/bazel-out/k8-fastbuild/bin/pygloo/gloo.build_tmpdir
Scanning dependencies of target gloo
[  2%] Building CXX object gloo/CMakeFiles/gloo.dir/algorithm.cc.o
Error: While checking $HOME

Caused by:
    environment variable not found
make[2]: *** [gloo/CMakeFiles/gloo.dir/build.make:82: gloo/CMakeFiles/gloo.dir/algorithm.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:235: gloo/CMakeFiles/gloo.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
n_____Printing#!/usr/bin/env bash
function symlink_to_dir() {
local target="$2"
mkdir -p "$target"
if [[ -f "$1" ]]; then
ln -s -f -t "$target" "$1"
elif [[ -L "$1" && ! -d "$1" ]]; then
cp "$1" "$2"
elif [[ -d "$1" ]]; then
SAVEIFS=$IFS
IFS=$'

I know nothing about Bazel, but this appears to be some sandboxing issue where $HOME is not propagated. I'm not sure why it requires it. In any case, there are no wheels for Python 3.11, and this does not appear to build out-of-the-box.

And just for completeness, pip install pygloo gives the error:

ERROR: Could not find a version that satisfies the requirement pygloo (from versions: none)
ERROR: No matching distribution found for pygloo

terraflops1048576 avatar Jun 21 '24 02:06 terraflops1048576

@larrylian CC

jovany-wang avatar Oct 28 '24 08:10 jovany-wang

@terraflops1048576 Hi, thanks for your reporting, we're taking looks now.

jovany-wang avatar Oct 28 '24 08:10 jovany-wang

pip install pygloo is still failing for me

AdrienVannson avatar Mar 19 '25 14:03 AdrienVannson

@AdrienVannson Any error message on your environment descriptions?

jovany-wang avatar Mar 20 '25 05:03 jovany-wang

It is the same problem as originally mentioned in the issue. I am using Python 3.12 on Ubuntu 24.04.

When running pip install pygloo, I get:

ERROR: Could not find a version that satisfies the requirement pygloo (from versions: none)
ERROR: No matching distribution found for pygloo

On PyPI ( https://pypi.org/project/pygloo/#files ), it seems that the wheels are not being built for Python 3.11, 3.12 or 3.13

AdrienVannson avatar Mar 20 '25 10:03 AdrienVannson

Is there any plan to support these more recent Python versions? @jovany-wang

It's not only the wheels not being built, recent Python versions are not supported according to setup.py

AdrienVannson avatar Jun 11 '25 10:06 AdrienVannson

Hi all, what's your scenario? and which python versions do you need, py11 or py12?

jovany-wang avatar Jul 04 '25 15:07 jovany-wang

On PyPI ( https://pypi.org/project/pygloo/#files ), it seems that the wheels are not being built for Python 3.11, 3.12 or 3.13

Yes. we just bumped until py10.

jovany-wang avatar Jul 04 '25 15:07 jovany-wang

Hello, we needed Python 3.12 or 3.13 at that time. In the end, we decided to use another solution, since we didn't find any way to make pygloo work with these versions.

AdrienVannson avatar Jul 04 '25 21:07 AdrienVannson

After investigating, I found a lot kits need to upgrade: cmake, python, bazel, rules_python and pybind_bazel etc.

jovany-wang avatar Jul 05 '25 07:07 jovany-wang

Update: I've successfully built it for py11/12/13 on my google colab container(ubuntu22.04) after upgrade the related kits in this https://github.com/ray-project/pygloo/pull/36 PR, but the tests failed at using incompatible ray library: GcsClient https://github.com/ray-project/pygloo/blob/main/tests/test_custom_store.py#L11

jovany-wang avatar Jul 07 '25 06:07 jovany-wang

Hello,is there a pygloo wheel (whl) file that supports the ARM architecture?

Armstrong2015 avatar Aug 12 '25 08:08 Armstrong2015

@Armstrong2015 Hi What's your scenario?

jovany-wang avatar Aug 13 '25 06:08 jovany-wang