You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[pyos] Installation from PyPI only supports some platforms #403
Looking at the installation instructions (readme or docs), I got the impression that a simple pip install python-graphblas would work for most users, but this does not appear to be the case. Originally I installed from Conda-Forge, so I did not notice this.
It seems that the essential dependency suitesparse-graphblas only provides binaries for Linux. Thus a simple pip install python-graphblas will fail for macOS and Windows users, and I expect most of them will be confused.
Can you please explain this situation better, so that the installation experience is as smooth as possible? I.e.,
Ideally, provide binaries for all platforms.
If this is not possible, point out the issues and their solutions.
A simple solution is to use Anaconda.
A more complicated one is to compile suitesparse-graphblas from source. There should be instructions for this.
I tried to let suitesparse-graphblas compile from sources on my machine. I am using macOS 10.14, and I have SuiteSparse_GraphBLAS 4.0.3 installed through MacPorts. Since MacPorts places headers and libraries in a non-standard location, I used the following installation command:
I think there is one last issue to figure out: how to create wheels with OpenMP on OS X Arm. Creating wheels with OpenMP is kind of fraught and is something we should probably ask a maintainer community such as Scientific-Python, PyOpenSci, or even StackOverflow. Any pointers?
(Note: I used to manually build wheels for Windows and OS X, but I lost access to the machine I used to do this, and it was pretty painful to do).
A more complicated one is to compile suitesparse-graphblas from source. There should be instructions for this.
That's a good idea. We actually test compiling python-suitesparse-graphblas from source (and from latest main branch):
When we test this in CI, we install SuiteSparse:GraphBLAS from conda-forge, so we don't need to manipulate any paths.
Building python-suitesparse-graphblas from source with SuiteSparse:GraphBLAS installed elsewhere is possible. This definitely deserves being documented once we figure out how to set the paths. This is kind of an advanced workflow, so we'll probably only include instructions for Linux at first where it's most likely. I think your attempt should work with a newer version of SuiteSparse:GraphBLAS, but it would be nice to confirm this.
I'm guessing SuiteSparse_GraphBLAS 4.0.3 is too old. I'll try with a newer one at a later point.
Yeah, that's way too old (almost 2 years old). python-suitesparse-graphblas version matches the version of SuiteSparse:GraphBLAS, and we require at least version 7.4.0.
I think there is one last issue to figure out: how to create wheels with OpenMP on OS X Arm. Creating wheels with OpenMP is kind of fraught and is something we should probably ask a maintainer community such as Scientific-Python, PyOpenSci, or even StackOverflow. Any pointers?
On Windows OpenMP shouldn't be an issue if the OpenMP version provided by MSVC is sufficient for you.
On macOS, we build libomp from sources, to make sure that we can control the macOS version that is targeted (we currently support 10.9 or later), and so that we can link it statically, making the igraph binary self-contained. Do not try to link to Homebrew's libomp! That will not be portable, and you won't be able to support older macOS versions.
Activity
szhorvat commentedon Mar 10, 2023
I tried to let
suitesparse-graphblascompile from sources on my machine. I am using macOS 10.14, and I have SuiteSparse_GraphBLAS 4.0.3 installed through MacPorts. Since MacPorts places headers and libraries in a non-standard location, I used the following installation command:The following (and many similar) errors occur:
I'm guessing SuiteSparse_GraphBLAS 4.0.3 is too old. I'll try with a newer one at a later point.
eriknw commentedon Mar 10, 2023
This is almost ready: GraphBLAS/python-suitesparse-graphblas#66
and is high on our roadmap (WIP): #360 (comment)
I think there is one last issue to figure out: how to create wheels with OpenMP on OS X Arm. Creating wheels with OpenMP is kind of fraught and is something we should probably ask a maintainer community such as Scientific-Python, PyOpenSci, or even StackOverflow. Any pointers?
(Note: I used to manually build wheels for Windows and OS X, but I lost access to the machine I used to do this, and it was pretty painful to do).
That's a good idea. We actually test compiling
python-suitesparse-graphblasfrom source (and from latest main branch):python-graphblas/.github/workflows/test_and_build.yml
Lines 204 to 207 in 673650d
When we test this in CI, we install SuiteSparse:GraphBLAS from conda-forge, so we don't need to manipulate any paths.
Building
python-suitesparse-graphblasfrom source with SuiteSparse:GraphBLAS installed elsewhere is possible. This definitely deserves being documented once we figure out how to set the paths. This is kind of an advanced workflow, so we'll probably only include instructions for Linux at first where it's most likely. I think your attempt should work with a newer version of SuiteSparse:GraphBLAS, but it would be nice to confirm this.Yeah, that's way too old (almost 2 years old).
python-suitesparse-graphblasversion matches the version of SuiteSparse:GraphBLAS, and we require at least version 7.4.0.szhorvat commentedon Mar 10, 2023
python-igraph has binaries for most platforms, including macOS on ARM, so perhaps the setup there can be of interest to you? https://github.com/igraph/python-igraph/blob/main/.github/workflows/build.yml#L102 I'm not deeply familiar with the details, but I can find them out for you, if you have questions.
What I recall:
eriknw commentedon Mar 31, 2023
Closing as completed.
python-suitesparse-graphblasnow has wheels for linux, windows, and macos 🎉 (there are a few more wheels we'd like to add)Issue for instructions of how to install with pre-installed version of SuiteSparse:GraphBLAS is here: GraphBLAS/python-suitesparse-graphblas#79