onnxruntime: pip install onnxruntime --- No matching distribution found for onnxruntime

Describe the bug Unable to install onnxruntime via pip/pip3

Urgency Trying to get this up and running for a business project we have due in a couple weeks.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 11 & Mac OSX (latest)
  • ONNX Runtime installed from (source or binary): binary (attempting - pip install onnxruntime)
  • ONNX Runtime version: 1.11.0
  • Python version: 3.9
  • Visual Studio version (if applicable): VS Code (latest) / Juptyer (latest)
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version:
  • GPU model and memory:

To Reproduce pip install onnxruntime

Expected behavior Installation of runtime libraries

Screenshots 2022-03-28_16-39-04

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 7
  • Comments: 17 (3 by maintainers)

Most upvoted comments

I’m getting this error just today on Windows and Docker (alpine container)

We’ll plan to add 3.10 soon so thank you for your input!

@troyliu0105 thanks for the solution. That is indeed works except that I have to install anconda and set a new python environmen since i use the native python environment. Thanks all.

And I tried to compile the wheels for Python 3.8/3.9 (Apple Silicon), maybe u need it. and here is the command I used to compile them (Tested on Macbook M1 Pro)

./build.sh --config Release --osx_arch arm64 --osx_arch arm64 --build_wheel --enable_pybind --parallel --use_coreml --use_extensions --skip_tests --build_shared_lib
image

onnxruntime-1.11.0-cp38-cp38-macosx_12_0_arm64.whl onnxruntime-1.11.0-cp39-cp39-macosx_12_0_arm64.whl

for now, there is a workaround for u. to install onnxruntime on Apple silicon with conda-forge

conda install onnxruntime -c conda-forge

@ShomyLiu @davidatorres

Thanks for suggestions. I had to use python3.1 -m pip install onnxruntime because of python3.11 being default.

@davidatorres @venttola for now, offical pypi only has wheels for 3.7 to 3.9. If you wanna use onnxruntime with 3.10. You should compile it by yourself.

@troyliu105 - Using Conda worked for me on Mac OSX with Python 3.9, but fails on Windows with Python 3.10.

conda install onnxruntime -c conda-forge

Same issue on Manjaro Linux 21.2.5 with Python 3.10.2.

pip install  onnxruntime
ERROR: Could not find a version that satisfies the requirement onnxruntime (from versions: none)
ERROR: No matching distribution found for onnxruntime

However my docker build works and I am using public.ecr.aws/lambda/python:3.8 as base image.

We don’t support packages for M1 yet. It works just fine for other macosx versions. Tested on Catalina 10.15.7.

(py39) MACHINE-M-Q132:~ MACHINE$ pip install onnxruntime
Collecting onnxruntime
  Downloading onnxruntime-1.11.0-cp39-cp39-macosx_10_15_x86_64.whl (5.7 MB)
     |████████████████████████████████| 5.7 MB 3.5 MB/s 
Collecting numpy>=1.21.0
  Downloading numpy-1.22.3-cp39-cp39-macosx_10_14_x86_64.whl (17.6 MB)
     |████████████████████████████████| 17.6 MB 4.2 MB/s 
Collecting flatbuffers
  Downloading flatbuffers-2.0-py2.py3-none-any.whl (26 kB)
Collecting protobuf
  Downloading protobuf-3.19.4-cp39-cp39-macosx_10_9_x86_64.whl (961 kB)
     |████████████████████████████████| 961 kB 3.6 MB/s 
Installing collected packages: protobuf, numpy, flatbuffers, onnxruntime
Successfully installed flatbuffers-2.0 numpy-1.22.3 onnxruntime-1.11.0 protobuf-3.19.4

(py39) MACHINE-M-Q132:~ MACHINE$ python -V
Python 3.9.11
(py39) MACHINE-M-Q132:~ MACHINE$ python
Python 3.9.11 (main, Mar 28 2022, 05:06:49) 
[Clang 12.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.

i>>> import onnxruntime as rt
>>> rt.__version__
'1.11.0'
>>> 

Hi, any idea when M1, M2 and M3 will be supported?

Same issue on MacOS with MacBook Pro( M1 2020) , macOS Monterey 12.1; Python 3.9

pip3 install onnxruntime 
ERROR: Could not find a version that satisfies the requirement onnxruntime (from versions: none)
ERROR: No matching distribution found for onnxruntime

@faxu @chilo-ms