欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Cannot uninstall ‘numpy‘问题解决

程序员文章站 2022-06-22 08:42:05
在安装excel处理库的时候碰到numpy报错,具体如下[IT-C02Z2CAXLVCF:temp shaolishuai$ pip install PandasDEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version o...

在安装excel处理库的时候碰到numpy报错,具体如下

[IT-C02Z2CAXLVCF:temp shaolishuai$ pip install Pandas
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting Pandas
  Using cached https://files.pythonhosted.org/packages/52/ff/912fe03a623a70bcf297d466013a0b4f4c68c3b60f86bf226682d061fc09/pandas-0.24.2-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
Requirement already satisfied: pytz>=2011k in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from Pandas) (2013.7)
Collecting numpy>=1.12.0 (from Pandas)
  Using cached https://files.pythonhosted.org/packages/09/96/84cf406fe7d589f3dba9fc0f737e65985a3526c6d8c783f02d4b5a10825d/numpy-1.16.6-cp27-cp27m-macosx_10_9_x86_64.whl
Requirement already satisfied: python-dateutil>=2.5.0 in /Library/Python/2.7/site-packages (from Pandas) (2.8.1)
Requirement already satisfied: six>=1.5 in /Library/Python/2.7/site-packages (from python-dateutil>=2.5.0->Pandas) (1.12.0)
Installing collected packages: numpy, Pandas
  Found existing installation: numpy 1.8.0rc1
ERROR: 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.

解决方案如下(强制升级numpy):

[IT-C02Z2CAXLVCF:temp shaolishuai$ pip install numpy --ignore-installed numpy
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: The directory '/Users/shaolishuai/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.
WARNING: The directory '/Users/shaolishuai/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.
Collecting numpy
  Downloading https://files.pythonhosted.org/packages/09/96/84cf406fe7d589f3dba9fc0f737e65985a3526c6d8c783f02d4b5a10825d/numpy-1.16.6-cp27-cp27m-macosx_10_9_x86_64.whl (13.9MB)
     |████████████████████████████████| 13.9MB 3.8MB/s 
Installing collected packages: numpy
Successfully installed numpy-1.16.6
[IT-C02Z2CAXLVCF:temp shaolishuai$ pip install Pandas
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: The directory '/Users/shaolishuai/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.
WARNING: The directory '/Users/shaolishuai/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.
Collecting Pandas
  Downloading https://files.pythonhosted.org/packages/52/ff/912fe03a623a70bcf297d466013a0b4f4c68c3b60f86bf226682d061fc09/pandas-0.24.2-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 (16.7MB)
     |████████████████████████████████| 16.7MB 4.1MB/s 
Requirement already satisfied: pytz>=2011k in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from Pandas) (2013.7)
Requirement already satisfied: numpy>=1.12.0 in /Library/Python/2.7/site-packages (from Pandas) (1.16.6)
Requirement already satisfied: python-dateutil>=2.5.0 in /Library/Python/2.7/site-packages (from Pandas) (2.8.1)
Requirement already satisfied: six>=1.5 in /Library/Python/2.7/site-packages (from python-dateutil>=2.5.0->Pandas) (1.12.0)
Installing collected packages: Pandas
Successfully installed Pandas-0.24.2

本文地址:https://blog.csdn.net/sls0919/article/details/107239008