Skip to content

Package compatibility

Pavel Koneski edited this page Apr 5, 2025 · 6 revisions

This document lists Python packages that are known to be supported or unsupported by IronPython. For a generic discussion about compatibility with Python packages see Running Python packages from PyPI.

Note

To install a Python module from PyPI, first perform a one-time preparation of a fresh IronPython installation or environment:

ipy -m ensurepip
ipy -m pip install --upgrade pip
ipy -m pip install --upgrade setuptools

Warning

IronPython does not currently support packages which are CPython extension modules (i.e depend on CPython's .dll/.so/.dylib).

⚠️ Known unsupported packages

Unsupported package Reason
numpy CPython extension module
pandas requires numpy
scipy requires numpy
opencv-python requires numpy
pytorch requires numpy
scikit-learn requires numpy
onnx requires numpy
dedupe requires numpy
imutils requires numpy

🟢 Known supported packages

pytest (4.6.11)

To install:

ipy -m pip install pytest==4.6.11 typing==3.10.0.0

The package fails with (probably the same issue as https://github.com/IronLanguages/ironpython3/issues/1212):

SystemError: Cannot access a closed file.

Edit _pytest/capture.py and replace:

with f:
    tmpfile = safe_text_dupfile(f, mode="wb+")

with:

tmpfile = EncodedFile(f, getattr(f, "encoding", "utf-8"))

requests (2.21.0)

To install:

ipy -m pip install requests==2.21.0

sympy (1.4)

To install:

ipy -m pip install sympy==1.4

The above will also automatically install mpmath 1.2.1 if not yet installed.

sympy comes with an interactive console, which can be started with:

ipy -m isympy