Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Numpy/ Pandas/ Matplotlib taking too long to install

Tags:

python

pandas

I've decided to install of MacOs Big Sur and now I do have to reinstall all the packages again... But I'm facing some problems.

I don't have much experience using terminal, but it is taking too long to install some data science libraries. For example, to install numpy it took some minutes, and right now, it's been 15 minutes since I've started to try to install the pandas lib

pip3 install pandas
Defaulting to user installation because normal site-packages is not writeable
Collecting pandas   Using cached pandas-1.1.4.tar.gz (5.2 MB)
Installing build dependencies ... -
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.15.4 in ./Library/Python/3.8/lib/python/site-packages (from pandas) (1.19.4)
Collecting pytz>=2017.2
Downloading pytz-2020.4-py2.py3-none-any.whl (509 kB)
 |████████████████████████████████| 509 kB 1.2 MB/s 
Requirement already satisfied: python-dateutil>=2.7.3 in ./Library/Python/3.8/lib/python/site-packages (from pandas) (2.8.1)
Requirement already satisfied: six>=1.5 in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from python-dateutil>=2.7.3->pandas) (1.15.0)
Building wheels for collected packages: pandas
Building wheel for pandas (PEP 517) ... \

I've been stuck at this screen for ages. 15 minutes, minimum. I can hear the fans of the computer working at full speed, also the laptop is getting warm. Why is it taking so long? Since it's only a small lib... I don't remember taking this amount of time when I installed it previously on another MacOs versions... Am I doing something wrong? Thank you.

like image 807
digolira2 Avatar asked Jul 17 '26 02:07

digolira2


2 Answers

In my case it was failing after attempting to build for like 15 20 minutes. I then upgraded pip using python3 -m pip install --upgrade pip. Post this the wheels were downloaded directly, and the package was installed in few seconds.

like image 159
Eeshaan Avatar answered Jul 18 '26 14:07

Eeshaan


Looks like Pip can not find an appropriate Pandas wheel for your platform (macOS 11.0, Python 3.8). The closest available match is for macOS 10.x. Instead, Pip needs to build the wheel (compile and link the library) before installing.

I can't say for sure without testing, but I suspect the platform tag changed on Big Sur from macosx_10_9_x86_64 to something like macosx_11_0....

Until numpy/pandas maintainers release binary wheels for your platform, one option is to build them yourself.

Seems the homebrew Python doesn't suffer from this problem, so you might want to give this a try.

like image 26
randomir Avatar answered Jul 18 '26 14:07

randomir



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!