matplotlib 1.3.1 has requirement numpy=1.5, but youll have numpy 1.8.0rc1 which is incompatible

2024/10/5 13:30:15

I'm executing bellow command in Mac (High Sierra) as a part of getting started with pyAudioAnalysis.

pip install numpy matplotlib scipy sklearn hmmlearn simplejson eyed3 pydub  

I'm getting following error during the installation process. Appreciate your input.

matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 1.8.0rc1 which is incompatible.

Please find more information below,

Channas-MacBook-Pro:~ channa$ python
Python 2.7.10 (default, Oct  6 2017, 22:29:07) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
[3]+  Stopped                 python
Channas-MacBook-Pro:~ channa$ pip -V
pip 10.0.0b2 from /Library/Python/2.7/site-packages/pip-10.0.0b2-py2.7.egg/pip (python 2.7)
Channas-MacBook-Pro:~ channa$ sudo pip install numpy matplotlib scipy sklearn hmmlearn simplejson eyed3 pydub
The directory '/Users/channa/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/channa/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.8.0rc1)
Requirement already satisfied: matplotlib in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.3.1)
Requirement already satisfied: scipy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (0.13.0b1)
Collecting sklearnDownloading sklearn-0.0.tar.gz
Collecting hmmlearnDownloading hmmlearn-0.2.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (183kB)100% |████████████████████████████████| 184kB 189kB/s 
Collecting simplejsonDownloading simplejson-3.13.2.tar.gz (79kB)100% |████████████████████████████████| 81kB 256kB/s 
Collecting eyed3Downloading eyeD3-0.8.5-py2.py3-none-any.whl (167kB)100% |████████████████████████████████| 174kB 100kB/s 
Collecting pydubDownloading pydub-0.21.0-py2.py3-none-any.whl
Requirement already satisfied: python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib) (1.5)
Collecting tornado (from matplotlib)Downloading tornado-5.0.1.tar.gz (504kB)100% |████████████████████████████████| 512kB 354kB/s 
Requirement already satisfied: pyparsing>=1.5.6 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib) (2.0.1)
Collecting nose (from matplotlib)Downloading nose-1.3.7-py2-none-any.whl (154kB)100% |████████████████████████████████| 163kB 213kB/s 
Collecting scikit-learn (from sklearn)Downloading scikit_learn-0.19.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (8.0MB)100% |████████████████████████████████| 8.0MB 259kB/s 
Collecting python-magic (from eyed3)Downloading python_magic-0.4.15-py2.py3-none-any.whl
Collecting pathlib (from eyed3)Downloading pathlib-1.0.1.tar.gz (49kB)100% |████████████████████████████████| 51kB 54kB/s 
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from eyed3) (1.4.1)
Collecting futures (from tornado->matplotlib)Downloading futures-3.2.0-py2-none-any.whl
Collecting singledispatch (from tornado->matplotlib)Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting backports_abc>=0.4 (from tornado->matplotlib)Downloading backports_abc-0.5-py2.py3-none-any.whl
matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 1.8.0rc1 which is incompatible.
Installing collected packages: scikit-learn, sklearn, hmmlearn, simplejson, python-magic, pathlib, eyed3, pydub, futures, singledispatch, backports-abc, tornado, noseRunning setup.py install for sklearn ... doneRunning setup.py install for simplejson ... doneRunning setup.py install for pathlib ... doneRunning setup.py install for tornado ... done
Consider using the `--user` option or check the permissions
Answer

I was able to solve this with @Jacob's solution with some additional steps. I'll post it here for anyone else facing this.

  1. Firstly as Jacob mentioned I downloaded and installed the latest Python 2.7.14+.
  2. Executed sudo easy_install pip to install pip again

  3. Executed sudo pip install numpy

https://en.xdnf.cn/q/70482.html

Related Q&A

VS Code Debugger Immediately Exits

I use VS Code for a python project but recently whenever I launch the debugger it immediately exits. The debug UI will pop up for half a second then disappear. I cant hit a breakpoint no matter where i…

Sudoku Checker in Python

I am trying to create a sudoku checker in python:ill_formed = [[5,3,4,6,7,8,9,1,2],[6,7,2,1,9,5,3,4,8],[1,9,8,3,4,2,5,6,7],[8,5,9,7,6,1,4,2,3],[4,2,6,8,5,3,7,9], # <---[7,1,3,9,2,4,8,5,6],[9,6,1,5,…

Subclassing numpy scalar types

Im trying to subclass numpy.complex64 in order to make use of the way numpy stores the data, (contiguous, alternating real and imaginary part) but use my own __add__, __sub__, ... routines.My problem i…

Python file IO w vs wb [duplicate]

This question already has answers here:What does wb mean in this code, using Python?(5 answers)Closed 10 years ago.Wondering what the real difference is when writing files from Python. From what I can…

How to extract hour, minute and second from Series filled with datetime.time values

Data:0 09:30:38 1 13:40:27 2 18:05:24 3 04:58:08 4 09:00:09Essentially what Id like to do is split this into three columns [hour, minute, second]Ive tried the following code but none see…

Getting an error attachment_filename does not exist in my docker environment

Due to some reasons this particular code is not working in docker but it works fine in development environment. I am getting error "TypeError: send_file() got an unexpected keyword argument attach…

How to check if a process with Command line argument is running using python

I would like to check if a script is running with a specific command line argument within a python script.For example I would like to check if:main.py testargIs running. Is there any way I can achieve …

cx_oracle and python 2.7 [duplicate]

This question already has answers here:Python module "cx_Oracle" module could not be found(4 answers)Closed 5 years ago.Im using python 2.7 and cx_oracle ( Windows x86 Installer (Oracle 10g, …

Inheritance in Python C++ extension

I have c++ library that need communicate with Python plugged in modules. Communication supposes implementing by Python some callback c++ interface. I have read already about writing extensions, but no …

exposing C++ class in Python ( only ET_DYN and ET_EXEC can be loaded)

I was looking at here to see how to expose c++ to Python. I have built Python deep learning code which uses boost-python to connect c++ and python and it is running ok, so my system has things for boos…