Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Could not build wheels for onnx which use PEP 517 and cannot be installed directly #6100

Closed
qd986692950 opened this issue Apr 25, 2024 · 2 comments
Labels
build Issues related to ONNX builds and packages question Questions about ONNX

Comments

@qd986692950
Copy link

Bug Report

Is the issue related to model conversion?

When I install onnx using pip, and run pip install onnx, I failed!

Describe the bug

when I use pip install Onnx ,and run pip install onnx==1.14.1, I failed!
it print:

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting onnx==1.14.1
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/8f/71/1543d8dad6a26df1da8953653ebdbedacea9f1a5bcd023fe10f8c5f66d63/onnx-1.14.1.tar.gz (11.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Requirement already satisfied: typing-extensions>=3.6.2.1 in d:\anaconda3\envs\veighna_studio_py36\lib\site-packages (from onnx==1.14.1) (4.7.1)
Collecting protobuf>=3.20.2
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/27/82/986065ef305c0989c99d8ef3f29e58a03fac6e64bb2c36ffe64500cc6955/protobuf-4.21.0-py3-none-any.whl (291 kB)
Requirement already satisfied: numpy in d:\anaconda3\envs\veighna_studio_py36\lib\site-packages (from onnx==1.14.1) (1.23.1)
WARNING: The candidate selected for download or install is a yanked version: 'protobuf' candidate (version 4.21.0 at https://pypi.tuna.tsinghua.edu.cn/packages/27/82/986065ef305c0989c99d8ef3f29e58a03fac6e64bb2c36ffe64500cc6955/protobuf-4.21.0-py3-none-any.whl#sha256=4e78116673ba04e01e563f6a9cca2c72db0be8a3e1629094816357e81cc39d36 (from https://pypi.tuna.tsinghua.edu.cn/simple/protobuf/))
Reason for being yanked: Required python version not configured correctly (https://github.com/protocolbuffers/protobuf/issues/10076)
Building wheels for collected packages: onnx
  Building wheel for onnx (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'D:\Anaconda3\envs\veighna_studio_py36\python.exe' 'D:\Anaconda3\envs\veighna_studio_py36\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp6y0imhlb'
       cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-j6mlkoam\onnx_37f776d24b5240fc9852b7cb21079ee1
  Complete output (79 lines):
  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: ['D:\\Cmake\\bin\\cmake.exe', '-DPYTHON_INCLUDE_DIR=D:\\Anaconda3\\envs\\veighna_studio_py36\\include', '-DPYTHON_EXECUTABLE=D:\\Anaconda3\\envs\\veighna_studio_py36\\python.exe', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cp36-win_amd64.pyd', '-DCMAKE_BUILD_TYPE=Release', '-DPY_VERSION=3.6', '-A', 'x64', '-T', 'host=x64', '-DONNX_ML=1', 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-j6mlkoam\\onnx_37f776d24b5240fc9852b7cb21079ee1']
  -- Building for: MinGW Makefiles
  CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.


  CMake Error at CMakeLists.txt:17 (project):
    Generator

      MinGW 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!
  Traceback (most recent call last):
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 349, in <module>
      main()
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 331, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 249, in build_wheel
      metadata_directory)
    File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-build-env-na3v66kp\overlay\Lib\site-packages\setuptools\build_meta.py", line 231, in build_wheel
      wheel_directory, config_settings)
    File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-build-env-na3v66kp\overlay\Lib\site-packages\setuptools\build_meta.py", line 215, in _build_with_temp_dir
      self.run_setup()
    File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-build-env-na3v66kp\overlay\Lib\site-packages\setuptools\build_meta.py", line 268, in run_setup
      self).run_setup(setup_script=setup_script)
    File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-build-env-na3v66kp\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 365, in <module>
      "backend-test-tools = onnx.backend.test.cmd_tools:main",
    File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-build-env-na3v66kp\overlay\Lib\site-packages\setuptools\__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\distutils\dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-build-env-na3v66kp\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "setup.py", line 236, in run
      self.run_command("cmake_build")
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "setup.py", line 222, in run
      subprocess.check_call(cmake_args)
    File "D:\Anaconda3\envs\veighna_studio_py36\lib\subprocess.py", line 311, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['D:\\Cmake\\bin\\cmake.exe', '-DPYTHON_INCLUDE_DIR=D:\\Anaconda3\\envs\\veighna_studio_py36\\include', '-DPYTHON_EXECUTABLE=D:\\Anaconda3\\envs\\veighna_studio_py36\\python.exe', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cp36-win_amd64.pyd', '-DCMAKE_BUILD_TYPE=Release', '-DPY_VERSION=3.6', '-A', 'x64', '-T', 'host=x64', '-DONNX_ML=1', 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-j6mlkoam\\onnx_37f776d24b5240fc9852b7cb21079ee1']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for onnx
Failed to build onnx
ERROR: Could not build wheels for onnx which use PEP 517 and cannot be installed directly

System information

have not use vs ,but use Pycharm
  • Pycharm version : 2023.1.4
@MaanavD
Copy link

MaanavD commented Apr 25, 2024

Hey @qd986692950 , this looks like an issue with your python installation.

I'd attempt:

@justinchuby
Copy link
Contributor

onnx 1.14 is an old version of ONNX. Please use the latest version.

@justinchuby justinchuby added question Questions about ONNX build Issues related to ONNX builds and packages and removed bug labels Apr 26, 2024
@justinchuby justinchuby closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to ONNX builds and packages question Questions about ONNX
Projects
None yet
Development

No branches or pull requests

3 participants