# Bug Report
### Is the issue related to model conversion?
Nope
### Descrβ¦ibe the bug
`pip install onnx` failes with
```
CMake Error at CMakeLists.txt:17 (project):
Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
```
(full log is at the bottom of this issue)
### System information
- OS Platform and Distribution (*e.g. Linux Ubuntu 16.04*): Windows 11 21H2 (Build 22000.708)
- ONNX version (*e.g. 1.7*): trying to install 1.11
- Python version: 3.10.5
- GCC/Compiler version (if compiling from source): 11.2
- CMake version: 3.23.2
- Protobuf version: 3.19.4
- Visual Studio version (if applicable): X
### Reproduction instructions
`pip install onnx`
(tried `python -m pip install onxx` too)
### Expected behavior
Onnx should be installed.
### Notes
Full log of installation:
```
PS C:\Program Files\NVIDIA GPU Computing Toolkit\TensorRT\v8.2.5.1> pip install onnx
Collecting onnx
Using cached onnx-1.11.0.tar.gz (9.9 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.16.6 in c:\python310\lib\site-packages (from onnx) (1.22.4)
Requirement already satisfied: protobuf>=3.12.2 in c:\python310\lib\site-packages (from onnx) (3.19.4)
Requirement already satisfied: typing-extensions>=3.6.2.1 in c:\python310\lib\site-packages (from onnx) (4.2.0)
Building wheels for collected packages: onnx
Building wheel for onnx (setup.py) ... error
error: subprocess-exited-with-error
Γ python setup.py bdist_wheel did not run successfully.
β exit code: 1
β°β> [60 lines of output]
fatal: not a git repository (or any of the parent directories): .git
running bdist_wheel
running build
running build_py
running create_version
running cmake_build
Using cmake args: ['C:\\Program Files\\CMake\\bin\\cmake.exe', '-DPYTHON_INCLUDE_DIR=C:\\Python310\\include', '-DPYTHON_EXECUTABLE=C:\\Python310\\python.exe', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cp310-win_amd64.pyd', '-DCMAKE_BUILD_TYPE=Release', '-DPY_VERSION=3.10', '-A', 'x64', '-T', 'host=x64', '-DONNX_ML=1', 'C:\\Users\\CookieHCl\\AppData\\Local\\Temp\\pip-install-kd1pp9j4\\onnx_f9fe8749f34749b8bd725ff3b021b84d']
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:17 (project):
Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/CookieHCl/AppData/Local/Temp/pip-install-kd1pp9j4/onnx_f9fe8749f34749b8bd725ff3b021b84d/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\CookieHCl\AppData\Local\Temp\pip-install-kd1pp9j4\onnx_f9fe8749f34749b8bd725ff3b021b84d\setup.py", line 336, in <module>
setuptools.setup(
File "C:\Python310\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Python310\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python310\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Python310\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "C:\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Python310\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\CookieHCl\AppData\Local\Temp\pip-install-kd1pp9j4\onnx_f9fe8749f34749b8bd725ff3b021b84d\setup.py", line 232, in run
self.run_command('cmake_build')
File "C:\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\CookieHCl\AppData\Local\Temp\pip-install-kd1pp9j4\onnx_f9fe8749f34749b8bd725ff3b021b84d\setup.py", line 218, in run
subprocess.check_call(cmake_args)
File "C:\Python310\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Program Files\\CMake\\bin\\cmake.exe', '-DPYTHON_INCLUDE_DIR=C:\\Python310\\include', '-DPYTHON_EXECUTABLE=C:\\Python310\\python.exe', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cp310-win_amd64.pyd', '-DCMAKE_BUILD_TYPE=Release', '-DPY_VERSION=3.10', '-A', 'x64', '-T', 'host=x64', '-DONNX_ML=1', 'C:\\Users\\CookieHCl\\AppData\\Local\\Temp\\pip-install-kd1pp9j4\\onnx_f9fe8749f34749b8bd725ff3b021b84d']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for onnx
Running setup.py clean for onnx
Failed to build onnx
Installing collected packages: onnx
Running setup.py install for onnx ... error
error: subprocess-exited-with-error
Γ Running setup.py install for onnx did not run successfully.
β exit code: 1
β°β> [61 lines of output]
fatal: not a git repository (or any of the parent directories): .git
running install
running build
running build_py
running create_version
running cmake_build
Using cmake args: ['C:\\Program Files\\CMake\\bin\\cmake.exe', '-DPYTHON_INCLUDE_DIR=C:\\Python310\\include', '-DPYTHON_EXECUTABLE=C:\\Python310\\python.exe', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cp310-win_amd64.pyd', '-DCMAKE_BUILD_TYPE=Release', '-DPY_VERSION=3.10', '-A', 'x64', '-T', 'host=x64', '-DONNX_ML=1', 'C:\\Users\\CookieHCl\\AppData\\Local\\Temp\\pip-install-kd1pp9j4\\onnx_f9fe8749f34749b8bd725ff3b021b84d']
CMake Error at CMakeLists.txt:17 (project):
Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/CookieHCl/AppData/Local/Temp/pip-install-kd1pp9j4/onnx_f9fe8749f34749b8bd725ff3b021b84d/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\CookieHCl\AppData\Local\Temp\pip-install-kd1pp9j4\onnx_f9fe8749f34749b8bd725ff3b021b84d\setup.py", line 336, in <module>
setuptools.setup(
File "C:\Python310\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Python310\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python310\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Python310\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Python310\lib\distutils\command\install.py", line 568, in run
self.run_command('build')
File "C:\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Python310\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\CookieHCl\AppData\Local\Temp\pip-install-kd1pp9j4\onnx_f9fe8749f34749b8bd725ff3b021b84d\setup.py", line 232, in run
self.run_command('cmake_build')
File "C:\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\CookieHCl\AppData\Local\Temp\pip-install-kd1pp9j4\onnx_f9fe8749f34749b8bd725ff3b021b84d\setup.py", line 218, in run
subprocess.check_call(cmake_args)
File "C:\Python310\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Program Files\\CMake\\bin\\cmake.exe', '-DPYTHON_INCLUDE_DIR=C:\\Python310\\include', '-DPYTHON_EXECUTABLE=C:\\Python310\\python.exe', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cp310-win_amd64.pyd', '-DCMAKE_BUILD_TYPE=Release', '-DPY_VERSION=3.10', '-A', 'x64', '-T', 'host=x64', '-DONNX_ML=1', 'C:\\Users\\CookieHCl\\AppData\\Local\\Temp\\pip-install-kd1pp9j4\\onnx_f9fe8749f34749b8bd725ff3b021b84d']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
Γ Encountered error while trying to install package.
β°β> onnx
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
```