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

Failed to build installable wheels for some pyproject.toml based project #3160

Open
2 tasks done
martin-bing opened this issue Aug 5, 2024 · 0 comments
Open
2 tasks done

Comments

@martin-bing
Copy link

Prerequisite

Environment

python 3.12
pytorch 2.2.0(I have tried 2.4.0,the same reslut)
macos 14.5 ( Apple M2 Max)

Reproduces the problem - code sample

install failed

Reproduces the problem - command or script

cd Documents/AiProject/ComfyUI
source comfyuiEnv/bin/activate
pip install --no-cache-dir -U openmim
mim install "mmcv>=2.0.1"

Reproduces the problem - error message

Looking in indexes: https://mirrors.cloud.tencent.com/pypi/simple
Looking in links: https://download.openmmlab.com/mmcv/dist/cpu/torch2.2.0/index.html
https://mirrors.cloud.tencent.com/pypi/packages/e9/a2/57a733e7e84985a8a0e3101dfb8170fc9db92435c16afad253069ae3f9df/mmcv-2.2.0.tar.gz (479 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: addict in ./comfyuienv/lib/python3.12/site-packages (from mmcv) (2.4.0)
.............................
Requirement already satisfied: six>=1.5 in ./comfyuienv/lib/python3.12/site-packages (from python-dateutil>=2.7->matplotlib->mmengine>=0.3.0->mmcv) (1.16.0)
Building wheels for collected packages: mmcv
Building wheel for mmcv (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [1497 lines of output]
/private/var/folders/62/_pb6x6556d54gy4tp84p4ncm0000gn/T/pip-install-4asutky2/mmcv_c45bc65a304e4778989feeb2e9ee309c/setup.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import DistributionNotFound, get_distribution, parse_version
running bdist_wheel
/Users/admin/Documents/AiProject/ComfyUI/comfyuienv/lib/python3.12/site-packages/torch/utils/cpp_extension.py:500: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-312
...................
copying mmcv/cnn/utils/fuse_conv_bn.py -> build/lib.macosx-10.9-universal2-cpython-312/mmcv/cnn/utils
writing manifest file 'mmcv.egg-info/SOURCES.txt'
/Users/admin/Documents/AiProject/ComfyUI/comfyuienv/lib/python3.12/site-packages/setuptools/command/build_py.py:215: _Warning: Package 'mmcv.ops.csrc.common' is absent from the packages configuration.
********************************************************************************
############################
# Package would be ignored #
############################
Python recognizes 'mmcv.ops.csrc.pytorch.npu' as an importable package[^1],
but it is absent from setuptools' packages configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'mmcv.ops.csrc.pytorch.npu' is explicitly added
          to the `packages` configuration field.
  
          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
  
          You can read more about "package discovery" on setuptools documentation page:
  !!
    check.warn(importable)
...................
  /Users/admin/Documents/AiProject/ComfyUI/comfyuienv/lib/python3.12/site-packages/torch/include/ATen/core/DeprecatedTypeProperties.h:110:34: error: 'value' is unavailable: introduced in macOS 10.13
        Device device = device_opt.value();
                                  ^   /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/optional:1066:27: note: 'value' has been explicitly marked unavailable here
      constexpr value_type& value() &
                            ^
  In file included from ./mmcv/ops/csrc/pytorch/active_rotated_filter.cpp:5:

.......
/Users/admin/Documents/AiProject/ComfyUI/comfyuienv/lib/python3.12/site-packages/torch/include/c10/util/OptionalArrayRef.h:159:34: error: 'value' is unavailable: introduced in macOS 10.13
return wrapped_opt_array_ref.value();
^
/Users/admin/Documents/AiProject/ComfyUI/comfyuienv/lib/python3.12/site-packages/torch/include/c10/util/OptionalArrayRef.h:222:13: note: in instantiation of member function 'c10::OptionalArrayRef::value' requested here
return a1.value() == other;
^
^/Users/admin/Documents/AiProject/ComfyUI/comfyuienv/lib/python3.12/site-/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/optional:1066:27: note: 'value' has been explicitly marked unavailable here
constexpr value_type& value() &
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mmcv
Running setup.py clean for mmcv
Failed to build mmcv
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (mmcv)

Additional information

1.I tried to execute "mim install mmcv-lite" and it was installed successfully,but my project (musetalk) need“mmcv>=2.0.0 mmcv<=2.2.0”. However, when executing "mim install mmcv-full", the same error occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant