ERROR: Could not build wheels for xformers, which is required to install pyproject.toml-based projects
I’m trying to install xformers, but am getting an error while building wheels for it. I’m using a Mac.The full error is:Collecting xformers
  Using cached xformers-0.0.20.tar.gz (7.6 MB)
  Preparing metadata (setup.py) ... Requirement already satisfied: torch>=1.12 in ./new_env/lib/python3.10/site-packages (from xformers) (2.0.1)
Requirement already satisfied: numpy in ./new_env/lib/python3.10/site-packages (from xformers) (1.24.3)
Collecting pyre-extensions==0.0.29 (from xformers)
  Using cached pyre_extensions-0.0.29-py3-none-any.whl (12 kB)
Collecting typing-inspect (from pyre-extensions==0.0.29->xformers)
  Using cached typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)
Requirement already satisfied: typing-extensions in ./new_env/lib/python3.10/site-packages (from pyre-extensions==0.0.29->xformers) (4.6.3)
Requirement already satisfied: filelock in ./new_env/lib/python3.10/site-packages (from torch>=1.12->xformers) (3.12.2)
Requirement already satisfied: sympy in ./new_env/lib/python3.10/site-packages (from torch>=1.12->xformers) (1.12)
Requirement already satisfied: networkx in ./new_env/lib/python3.10/site-packages (from torch>=1.12->xformers) (3.1)
Requirement already satisfied: jinja2 in ./new_env/lib/python3.10/site-packages (from torch>=1.12->xformers) (3.1.2)
Requirement already satisfied: MarkupSafe>=2.0 in ./new_env/lib/python3.10/site-packages (from jinja2->torch>=1.12->xformers) (2.1.3)
Requirement already satisfied: mpmath>=0.19 in ./new_env/lib/python3.10/site-packages (from sympy->torch>=1.12->xformers) (1.3.0)
Collecting mypy-extensions>=0.3.0 (from typing-inspect->pyre-extensions==0.0.29->xformers)
  Using cached mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Building wheels for collected packages: xformers
  Building wheel for xformers (setup.py) ... error: subprocess-exited-with-error
...
  ERROR: Failed building wheel for xformers
  Running setup.py clean for xformers
Failed to build xformers
ERROR: Could not build wheels for xformers, which is required to install pyproject.toml-based projectsI really appreciate any help!
2023-07-24T23:48:22Z
I encountered the same issue. Let me know if you resolved it.
2023-08-02T10:00:32Z
yup same here, I need this to work for the project which i will definitely drop a week later.
2023-08-03T07:31:06Z
I got the same error would love to know the answer-
2023-08-04T12:32:19Z
Same error.
2023-08-16T00:33:55Z
same error.
2023-09-09T13:43:19Z
same error.
2023-09-17T12:36:46Z
I had the same issue. After readingthis GH commentthat it might be problems with versions of different tools, I tried downgrading my GCC and after that, it work successfullyHow:brew install gcc@7- install version major 7 versiongcc-7 --version- check the version, it was 7.5 for meCC=gcc-7 CXX=g++-7 pip install xformer- install xformer using gcc 7.5 version
2024-07-25T03:39:39Z
Any other solutions? I get Error:gcc@7 has been disabled because it is deprecated upstream!
2024-08-13T23:53:54Z
Error: gcc@7 has been disabled because it is deprecated upstream! It will be disabled on 2024-02-22.
2024-09-17T10:39:31Z
This can be solved by installing llvm:The Linux Notes – 31 Jan 24Resolving clang: error: unsupported option ‘-fopenmp’ on macOSOpenMP is a popular API that supports multi-platform shared-memory multiprocessing programming. When working with certain benchmarks, users may encounter issues related to OpenMP support and…Continue readingResolving clang: error: unsupported option...Just be careful when adding the environment variables since you need to add the correct path to the binaries:export PATH=“/<PATH_TO_YOUR_LLVM>/llvm/bin:$PATH”export CC=“/<PATH_TO_YOUR_LLVM>/llvm/bin/clang”export CXX=“/<PATH_TO_YOUR_LLVM>/llvm/bin/clang++”