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

Getting requirements to build wheel did not run successfully #2079

Open
N4nn0x opened this issue Sep 4, 2024 · 1 comment
Open

Getting requirements to build wheel did not run successfully #2079

N4nn0x opened this issue Sep 4, 2024 · 1 comment

Comments

@N4nn0x
Copy link

N4nn0x commented Sep 4, 2024

Running Python 3.12.5, trying to install requirements for YOLOv7 getting the below error (it goes on for longer). Are there any compatibility issues between these 2? should I try an earlier version of python?

py -m pip install -r requirements.txt

Collecting matplotlib>=3.2.2 (from -r requirements.txt (line 4))
Using cached matplotlib-3.9.2-cp312-cp312-win_amd64.whl.metadata (11 kB)
Collecting numpy<1.24.0,>=1.18.5 (from -r requirements.txt (line 5))
Using cached numpy-1.23.5.tar.gz (10.7 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

@Suhrud1511
Copy link

Hi N4nn0x,

I encountered a similar issue while installing the requirements for YOLOv7 with Python 3.12.5. Here’s a potential solution that worked for me:

  1. Switch to a Compatible Python Version: YOLOv7 and some of its dependencies may not be fully compatible with Python 3.12.5. I recommend using Python 3.10 or 3.11 as this repository was authored a couple of years ago. You can create a virtual environment with one of these versions:

    # Install Python 3.10 or 3.11
    py -m venv venv
    venv\Scripts\activate  # On Windows
    source venv/bin/activate  # On macOS/Linux
    
    # Then install the requirements
    py -m pip install -r requirements.txt
  2. Upgrade Pip and Setuptools: Ensure you are using the latest versions of pip and setuptools to avoid any compatibility issues with building packages:

    py -m pip install --upgrade pip setuptools
  3. Install Numpy Separately: Try installing numpy separately to handle potential build issues:

    py -m pip install numpy==1.23.5
  4. Use Pre-built Wheels: If you continue to experience issues, consider using pre-built wheels for numpy to avoid building from source. You can find them on PyPI or Unofficial Windows Binaries for Python Extension Packages.

By following these steps, you should be able to resolve the installation issue. If anyone has further suggestions or different experiences, please share!

Thanks!

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

2 participants