question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A full wheelhouse with something like cibuildwheel could help reduce installation issues for standard users. People who need to build against specific MPI libraries can still get the source dists with the --no-binary flag. It would also help during doc (#26) and other CI pipelines.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
dalcinlcommented, Mar 8, 2021

@Helveg If you are targeting novices, would’t it make sense to teach them to start with the Miniforge installer and get everything from conda-forge?

If mpi4py gives grief to novice users, it is most likely because novice users typically make a total mess of their development environments. Look at mpi4py’s CI infrastructure covering mainstream Linux/macOS/Windows, you usually execute a one-liner to install the system MPI, and pip install mpi4py works out of the box.

Anyway, I’m not opposed at all to your suggestion, provided it is implemented the right way. Your mpi4py-mpich and mpi4py-openmpi packages would need to be just a wheel handling the binary installation of the respective full MPI implementation. Most likely, you will have to make these packages relocatable, such that users can install them in any site-packages directory (at least the user one in ~/.local). Handling binary relocation yourself requires a lot of nasty and platform-dependent stuff, ask conda folks . And then you will the cruel reality: wheels do not have any sort of support for post-install script, so forget about using binary editing tools like chrpath on Linux or install_name_tool on macOS. I anticipate that you will fail and waste your time. Although you will learn a lot in the proceses. Of course, I could be wrong. But remember this ain’t my first rodeo.

1reaction
dalcinlcommented, Mar 5, 2021

It is not just about the MPI library. Actually running MPI applications usually require some additional MPI runtime (e.g. mpiexec command). Bundling the MPI libraries on mpi4py wheels is IMHO a bad idea.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation — MPI for Python 3.1.4 documentation
pip keeps previouly built wheel files on its cache for future reuse. If you want to reinstall the mpi4py package using a different...
Read more >
mpi4py - PyPI
Windows users can install mpi4py from binary wheels hosted on the Python Package Index (PyPI) using pip: $ python -m pip install mpi4py....
Read more >
Error when installing mpi4py - python - Stack Overflow
As the error says, there are libraries missing. I solved it by installing libopenmpi-dev package sudo apt-get install libopenmpi-dev.
Read more >
mpi4py - Wheelodex
Wheel Details ; Filename: mpi4py-3.1.4-cp39-cp39-win_amd64.whl ; Download: [link] ; Size: 474181 ; MD5: e8387c642919358a7d5739c8e7128f89 ; SHA256: ...
Read more >
Downloading mpi4py for Fedora
ERROR: Failed building wheel for mpi4py Failed to build mpi4py ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found