Mac OS uses pip to install pandas prompt cannot install ‘numpy’ solution

When I was rebuilding my computer’s plotly environment, I encountered a problem, that is, when I used pip to install pandas, I always prompted:

pip uninstall numpy
Cannot uninstall 'numpy'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

Due to the limited level of English, at the beginning of the period, I thought it was due to insufficient authority, and sudo still reported an error. After translating with the help of tools, it is found that numpy cannot be unloaded for the following reasons:

This is a distutils installed project, so we cannot determine exactly which files belong to it, which would result in only a partial uninstallation.

Numpy is a standard library. It reminds me that some software in the windows system will be placed in the system folder when it is installed. As a result, the prompt can not accurately identify the files that need to be unloaded and deleted, resulting in the failure of unloading. Although it is not clear why numpy needs to be uninstalled before pandas is installed, PIP is used to install a wave first. The tips are as follows:

Requirement already satisfied: numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.8.0rc1)

Still can’t, simply delete directly. To remind you, backup first, and then install numpy again after installation, so it’s safer

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python$ ls | grep numpy
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python$ sudo mv numpy-1.8.0rc1-py2.7.egg-info /Users/fv/

There are also some pitfalls: looking at the foreign netizens, there are many bugs in the version of 3. + and I really want to roll back to 2.4. New computers must pay attention to the version of the relevant dependency library. Sometimes the plot prompt can’t find the module, just because the version is too low

Similar Posts: