Open Source Development

Open Source Development

Connect, learn, share, and engage with IBM Power.

 View Only

Install wheels from IBM Python wheel repository

By Nikhil Kalbande posted yesterday

  

Python wheels are often the most desired option when you want to provide precompiled installation packages that target specific Python versions. IBM Python wheel repository hosts an extensive collection of wheels that support IBM Power architecture. 

In this blog we have demonstrated steps to install wheels that are supported on ppc64le architecture for different packages from IBM Python wheel repository.

For more information, see Open Source Wheel Packages for Linux on Power.

How to install any package from IBM Python wheel repository

Any wheel that is available on IBM Python wheel repository can be installed with the pip command as shown below.

pip install --prefer-binary  <package_name>==<version> --extra-index-url=https://wheels.developerfirst.ibm.com/power/linux

For example, pip install --prefer-binary torch==2.6.0 --extra-index-url=https://wheels.developerfirst.ibm.com/power/linux

Note: Use the option ‘--prefer-binary’ to ensure that the wheels are installed for required dependencies from IBM Python wheel repository only and not pypi, irrespective of the package version.

If a package has dependencies on any libraries such as libprotobuf or libopenblas (for example, pytorch has a dependency on libprotobuf), then it is expected to explicitly install libprotobuf wheel from IBM Python Wheel Repository and set LD_LIBRARY_PATH environment variable accordingly.

Example

pip install --prefer-binary libprotobuf==4.25.3 torch==2.6.0 --extra-index-url=https://wheels.developerfirst.ibm.com/power/linux

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/opt/venv/lib/python3.12/site-packages/libprotobuf/lib64

Guidelines for using combination of IBM Python wheel repository and pypi .org registries

There are certain important points to remember when you are using a combination of IBM Python wheel repository and pypi.org registries. These are as follows:

·       Install main wheel and dependencies only from IBM Python wheel repository. Following is a sample command.

pip install --prefer-binary  <package_name>==<version> --index-url=https://wheels.developerfirst.ibm.com/power/linux

·       Install primarily from IBM Python wheel repository and search the pypi.org only if the wheel is not available in the IBM Python wheel repository. Following is a sample command.

pip install --prefer-binary  <package_name>==<version> --extra-index-url=https://wheels.developerfirst.ibm.com/power/linux

Conclusion: Installing packages from IBM Python wheel repository is a pretty straightforward process. Do let us know if you find the instructions in this blog useful by leaving a comment.

0 comments
11 views

Permalink