Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve "Preparing wheel metadata ... error" this error for MacOS for python 3.9

I am trying to use pip3 with python 3.9 to install modules... I read replies for windows which suggest installing VisualStudio as we need a good C++ compiler

I use macOS

I am adding the input and error message for better understanding

Input:

rohansaswade@Rohans-MBP ~ % pip3 install numpy

Output:

 Collecting numpy
  Using cached numpy-1.19.2.zip (7.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:

I did not mention the complete error output as it seems pretty irrelevant, yet if you need it to help me, please drop a comment.

I use macOS Catalina 10.15.7 and python 3.9

like image 845
phoenix Avatar asked Feb 02 '26 01:02

phoenix


1 Answers

I had the same issue. In my case, the steps below helped though it was time-consuming.

#Preparation
pip install cython
git clone https://github.com/numpy/numpy.git

#Steps
cd numpy
python setup.py build
python setup.py install

I hope it works for you too.

like image 60
Shintaro Avatar answered Feb 04 '26 13:02

Shintaro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!