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

[BUG] If you are seeing this error, please report to #3607

Closed
rickwierenga opened this issue Sep 24, 2022 · 2 comments
Closed

[BUG] If you are seeing this error, please report to #3607

rickwierenga opened this issue Sep 24, 2022 · 2 comments
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.

Comments

@rickwierenga
Copy link

setuptools version

65.3.0

Python version

3.10.6

OS

M1 Mac

Additional environment information

No response

Description

Tried installing onnx using https://github.com/onnx/onnx#mac.

Ran into an error asking to report the issue here. See full output below.

SETUPTOOLS_ENABLE_FEATURES="legacy-editable" works.

Let me know if you anything else.

Expected behavior

How to Reproduce

see above

Output

      Consolidate compiler generated dependencies of target onnx_cpp2py_export
      [100%] Built target onnx_cpp2py_export
      running build_ext
      copying somewhere/.setuptools-cmake-build/onnx_cpp2py_export.cpython-310-darwin.so -> /private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/tmpmzrmzw7l.build-lib/onnx
      Traceback (most recent call last):
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/_distutils/file_util.py", line 40, in _copy_file_contents
          fdst = open(dst, 'wb')
      FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/tmpmzrmzw7l.build-lib/onnx/onnx_cpp2py_export.cpython-310-darwin.so'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 140, in run
          self._create_wheel_file(bdist_wheel)
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 330, in _create_wheel_file
          files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 261, in _run_build_commands
          self._run_build_subcommands()
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 288, in _run_build_subcommands
          self.run_command(name)
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
          cmd_obj.run()
        File "<string>", line 255, in run
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 84, in run
          _build_ext.run(self)
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
          self.build_extensions()
        File "<string>", line 272, in build_extensions
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 351, in copy_file
          return file_util.copy_file(
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/_distutils/file_util.py", line 163, in copy_file
          _copy_file_contents(src, dst)
        File "/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/pip-build-env-kv9wckuz/overlay/lib/python3.10/site-packages/setuptools/_distutils/file_util.py", line 42, in _copy_file_contents
          raise DistutilsFileError(
      distutils.errors.DistutilsFileError: could not create '/private/var/folders/yz/5_6_nfl928v85_5lk2gqpctm0000gn/T/tmpmzrmzw7l.build-lib/onnx/onnx_cpp2py_export.cpython-310-darwin.so': No such file or directory
      error: Support for editable installs via PEP 660 was recently introduced
      in `setuptools`. If you are seeing this error, please report to:
      
      https://github.com/pypa/setuptools/issues
      
      Meanwhile you can try the legacy behavior by setting an
      environment variable and trying to install again:
      
      SETUPTOOLS_ENABLE_FEATURES="legacy-editable"
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building editable for onnx
Failed to build onnx
ERROR: Could not build wheels for onnx, which is required to install pyproject.toml-based projects
@rickwierenga rickwierenga added bug Needs Triage Issues that need to be evaluated for severity and status. labels Sep 24, 2022
@abravalheri
Copy link
Contributor

Hi @rickwierenga, thank you very much for reporting this.

Would this issue be a duplication of #3606? (the difference seems to be only the OS, right?)

@rickwierenga
Copy link
Author

Yes. Closing this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

No branches or pull requests

2 participants