Closed jtilly closed 6 months ago
I'm curious why this isn't a problem with their pypi package:
$ pip install onnxruntime==1.18.0
Collecting onnxruntime==1.18.0
Downloading onnxruntime-1.18.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (4.3 kB)
Collecting coloredlogs (from onnxruntime==1.18.0)
Downloading coloredlogs-15.0.1-py2.py3-none-any.whl.metadata (12 kB)
Collecting flatbuffers (from onnxruntime==1.18.0)
Downloading flatbuffers-24.3.25-py2.py3-none-any.whl.metadata (850 bytes)
Collecting numpy>=1.26.0 (from onnxruntime==1.18.0)
Downloading numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.0/61.0 kB 1.6 MB/s eta 0:00:00
Collecting packaging (from onnxruntime==1.18.0)
Downloading packaging-24.0-py3-none-any.whl.metadata (3.2 kB)
Collecting protobuf (from onnxruntime==1.18.0)
Downloading protobuf-5.27.0-cp38-abi3-manylinux2014_x86_64.whl.metadata (592 bytes)
Collecting sympy (from onnxruntime==1.18.0)
Downloading sympy-1.12-py3-none-any.whl.metadata (12 kB)
Collecting humanfriendly>=9.1 (from coloredlogs->onnxruntime==1.18.0)
Downloading humanfriendly-10.0-py2.py3-none-any.whl.metadata (9.2 kB)
Collecting mpmath>=0.19 (from sympy->onnxruntime==1.18.0)
Downloading mpmath-1.3.0-py3-none-any.whl.metadata (8.6 kB)
Downloading onnxruntime-1.18.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.8/6.8 MB 10.3 MB/s eta 0:00:00
Downloading numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.0/18.0 MB 11.8 MB/s eta 0:00:00
Downloading coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.0/46.0 kB 11.0 MB/s eta 0:00:00
Downloading flatbuffers-24.3.25-py2.py3-none-any.whl (26 kB)
Downloading packaging-24.0-py3-none-any.whl (53 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.5/53.5 kB 9.4 MB/s eta 0:00:00
Downloading protobuf-5.27.0-cp38-abi3-manylinux2014_x86_64.whl (309 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 309.2/309.2 kB 13.3 MB/s eta 0:00:00
Downloading sympy-1.12-py3-none-any.whl (5.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 12.6 MB/s eta 0:00:00
Downloading humanfriendly-10.0-py2.py3-none-any.whl (86 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.8/86.8 kB 15.4 MB/s eta 0:00:00
Downloading mpmath-1.3.0-py3-none-any.whl (536 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 4.6 MB/s eta 0:00:00
Installing collected packages: mpmath, flatbuffers, sympy, protobuf, packaging, numpy, humanfriendly, coloredlogs, onnxruntime
Successfully installed coloredlogs-15.0.1 flatbuffers-24.3.25 humanfriendly-10.0 mpmath-1.3.0 numpy-1.26.4 onnxruntime-1.18.0 packaging-24.0 protobuf-5.27.0 sympy-1.12
(py312) ✔ ~
06:54 $ pip check
No broken requirements found.
$ mamba list
$ mamba list
# packages in environment at /home/mark/miniforge3/envs/py312:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
bzip2 1.0.8 hd590300_5 conda-forge
ca-certificates 2024.2.2 hbcca054_0 conda-forge
coloredlogs 15.0.1 pypi_0 pypi
flatbuffers 24.3.25 pypi_0 pypi
humanfriendly 10.0 pypi_0 pypi
ld_impl_linux-64 2.40 hf3520f5_1 conda-forge
libexpat 2.6.2 h59595ed_0 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-ng 13.2.0 h77fa898_7 conda-forge
libgomp 13.2.0 h77fa898_7 conda-forge
libnsl 2.0.1 hd590300_0 conda-forge
libsqlite 3.45.3 h2797004_0 conda-forge
libuuid 2.38.1 h0b41bf4_0 conda-forge
libxcrypt 4.4.36 hd590300_1 conda-forge
libzlib 1.2.13 h4ab18f5_6 conda-forge
mpmath 1.3.0 pypi_0 pypi
ncurses 6.5 h59595ed_0 conda-forge
numpy 1.26.4 pypi_0 pypi
onnxruntime 1.18.0 pypi_0 pypi
openssl 3.3.0 h4ab18f5_3 conda-forge
packaging 24.0 pypi_0 pypi
pip 24.0 pyhd8ed1ab_0 conda-forge
protobuf 5.27.0 pypi_0 pypi
python 3.12.3 hab00c5b_0_cpython conda-forge
readline 8.2 h8228510_1 conda-forge
setuptools 70.0.0 pyhd8ed1ab_0 conda-forge
sympy 1.12 pypi_0 pypi
tk 8.6.13 noxft_h4845f30_101 conda-forge
tzdata 2024a h0c530f3_0 conda-forge
wheel 0.43.0 pyhd8ed1ab_1 conda-forge
xz 5.2.6 h166bdaf_0 conda-forge
I'm curious why this isn't a problem with their pypi package:
I believe upstream is not building PyPI's onnxruntime against NumPy 2.0
So similarly I might not be able to I stall it with bumpy 1.23 for example???
These might be the dependencies used to build on PyPI:
numpy==1.21.6 ; python_version < '3.11'
numpy==1.24.2 ; python_version == '3.11'
numpy==1.26.0 ; python_version >= '3.12'
Trying to run the following on Python 3.9 seems to confirm this:
$ pip install onnxruntime==1.18 numpy==1.20 ~/groundzero/foo
Collecting onnxruntime==1.18
Downloading onnxruntime-1.18.0-cp39-cp39-macosx_11_0_universal2.whl.metadata (4.2 kB)
Collecting numpy==1.20
Using cached numpy-1.20.0-cp39-cp39-macosx_11_0_arm64.whl
Collecting coloredlogs (from onnxruntime==1.18)
Downloading coloredlogs-15.0.1-py2.py3-none-any.whl.metadata (12 kB)
Collecting flatbuffers (from onnxruntime==1.18)
Downloading flatbuffers-24.3.25-py2.py3-none-any.whl.metadata (850 bytes)
INFO: pip is looking at multiple versions of onnxruntime to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install numpy==1.20 and onnxruntime==1.18.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested numpy==1.20
onnxruntime 1.18.0 depends on numpy>=1.21.6
I think i get it. they are using the old style numpy build system in their builds where you are "forward" compatible with future numpy pins.
They have not built for numpy 2.0, so they have not yet seen this issue.
Solution to issue cannot be found in the documentation.
Issue
produces
Installed packages
Environment info