Please support Pypy v7.3+
AnsweredI cannot install gurobipy using pip on Pypy (v7.3.15). pip informs me that there are no available gurobipy distributions for Pypy. Please add a distribution for the Pypy interpreter (https://www.pypy.org/). Instructions for dealing with Cython & Pypy together are here: https://cython.readthedocs.io/en/latest/src/userguide/pypy.html
-
gurobipy
, the Python API for Gurobi, is specifically developed and optimized for CPython, the standard Python interpreter. This is because Gurobi is a highly optimized software for mathematical optimization, and its performance is closely tied to the underlying interpreter and libraries used.PyPy, while an excellent alternative Python interpreter known for its speed improvements, especially for long-running applications, differs significantly in how it handles certain Python features and external C extensions compared to CPython. This difference can lead to compatibility issues with packages that are tightly bound to the CPython runtime environment, such as
gurobipy
.Regarding your request to add a distribution for the PyPy interpreter:
-
Technical Challenges: Adapting
gurobipy
for PyPy would likely involve significant changes to the package to ensure compatibility and performance. This is becausegurobipy
relies heavily on CPython's C API and may use features that are not fully compatible with PyPy. Adapting to PyPy's JIT (Just-In-Time) compilation and garbage collection might also present challenges. -
Development Priorities: Gurobi Optimization might prioritize maintaining and improving performance and compatibility with CPython due to its widespread use and the specific needs of most Gurobi users. Supporting PyPy could divert resources from these primary objectives.
-
Community Support: While the Python community is diverse and dynamic, with many different interpreters and environments, resource constraints often mean that developers (including those at Gurobi) must prioritize where they focus their support and development efforts.
-
Alternatives: If you need to use Gurobi in an environment that’s not compatible with the official
gurobipy
package, consider alternative approaches. For instance, you might run Gurobi in a separate CPython environment and communicate with it from your PyPy-based application using inter-process communication or a network API.
1 -
Please sign in to leave a comment.
Comments
1 comment