Skip to content
Advertisement

Trying to install onnx using pip and it throwing error: metadata-generation-failed

So i trying to install onnx using pip install.

OS: Windows 10 LTSC Build 17763

(i installed all packages from requirements.txt using pip install -r | onnx entry in req.txt “# onnx>=1.9.0 # ONNX export” but onnx won’t install)

I try to install it using:

  1. pip install onnx
  2. pip3 install
  3. pip install onnx>=1.9.0
  4. pip3 install onnx>=1.9.0

on python versions

  1. 3.7.0
  2. 3.10.4
  3. 3.9.something
  • i try to download onnx : pip download onnx

and every time i get this:

Collecting onnx
  Using cached onnx-1.11.0.tar.gz (9.9 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      fatal: not a git repository (or any of the parent directories): .git
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:UsersRed007MasterAppDataLocalTemppip-download-coisn9j3onnx_f49974f8ac4344abaca0eecae41c15e4setup.py", line 86, in <module>
          assert CMAKE, 'Could not find "cmake" executable!'
      AssertionError: Could not find "cmake" executable!
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

what is “cmake” where i can get it and how i can fix it? + why i need that “cmake” only for this package?

AND what alternative was on downloading/installing packages i have? + what i’m doing wrong.

Advertisement

Answer

Download (and install + add to PATH) CMake from cmake.org/download/ and use fresh venv on python version 3.9.2.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement