我的环境:

[root@ansible ~]# python -V
Python 2.7.5
[root@ansible ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@ansible ~]# pip -V
pip 20.2.2 from /usr/lib/python2.7/site-packages/pip (python 2.7)
[root@ansible ~]#

安装 jupyter 时报错如下:

pip install jupyter
...
Collecting pyparsing>=2.0.2
Downloading http://pypi.doubanio.com/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
|████████████████████████████████| 67 kB 4.7 MB/s
Requirement already satisfied: contextlib2; python_version < "3" in /usr/lib/python2.7/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter) (0.6.0.post1)
Requirement already satisfied: zipp>=0.5 in /usr/lib/python2.7/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter) (1.2.0)
Using legacy 'setup.py install' for pandocfilters, since package 'wheel' is not installed.
Installing collected packages: pyparsing, packaging, bleach, pandocfilters, testpath, nbconvert, terminado, notebook, widgetsnbextension, ipywidgets, jupyter-console, jupyter
Attempting uninstall: pyparsing
Found existing installation: pyparsing 1.5.6
ERROR: Cannot uninstall 'pyparsing'. 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.

解决办法,手动升级 pyparsing 版本之后再次运行 pip install jupyter,安装成功。

pip install -I pyparsing==2.2.0
Successfully installed pyparsing-2.2.0
[root@ansible ~]# pip install jupyter
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your P ython as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in Janua ry 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/late st/development/release-process/#python-2-support
Looking in indexes: http://pypi.douban.com/simple
...
Successfully installed bleach-3.1.5 ipywidgets-7.5.1 jupyter-1.0.0 jupyter-console-5.2.0 nbconvert-5.6.1 notebook-5.7.10 packaging-20.4 pandocfilters-1.4.2 terminado-0.8.3 testpath-0.4.4 widgetsnbextension-3.5.1```

参考文章

解决 Cannot uninstall 'pyparsing' 问题

https://www.cnblogs.com/qq952693358/p/10246375.html

Cannot uninstall 'pyparsing'. It is a distutils installed project的更多相关文章

  1. pip "Cannot uninstall 'six'. It is a distutils installed project..." 解决方法

    安装 mysql-connector-python 时,由于依赖包 six 之前已经安装过,但是不能自动更新到所需版本.有如下错误提示: pip "Cannot uninstall 'six ...

  2. Cannot uninstall 'html5lib'. 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.

    如标题,安装Tensorflow-gpu时遇到的完整问题 Cannot uninstall 'html5lib'. It is a distutils installed project and th ...

  3. Cannot uninstall 'pyserial'. It is a distutils installed project and thus we cannot a ccurately determine which files belong to it which would lead to only a partial uninstall. 解决方法

    最近再升级 pyserial模块时,采用 pip install --upgrade pyserial,待模块下载完成准备卸载原版本时 提示:“Cannot uninstall 'pyserial'. ...

  4. python 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.

    在Python中移除(升级)numpy的时候出现: Cannot uninstall 'numpy'. It is a distutils installed project and thus we ...

  5. Cannot uninstall 'enum34'. 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.

    更新tensorflow时遇到报错 Found existing installation: enum34 1.0.4Cannot uninstall 'enum34'. It is a distut ...

  6. [python] 安装TensorFlow问题 解决Cannot uninstall 'wrapt'. It is a distutils installed project

    cmd安装 pip install tensorflow 1.遇到了 ERROR: Cannot uninstall 'wrapt'. It is a distutils installed proj ...

  7. ERROR: Cannot uninstall 'chardet'. 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.

    pip 安装 docker库报错: ERROR: Cannot uninstall 'chardet'. It is a distutils installed project and thus we ...

  8. ERROR: Cannot uninstall 'wrapt'. 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.

    pip install imagededup 时,报错:Cannot uninstall 'wrapt'. It is a distutils installed project and thus w ...

  9. python安装第三方库报错:Cannot uninstall '***'. 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.

    pip install --ignore-installed ${PACKAGE_NAME}

随机推荐

  1. 关于python中显存回收的问题

    技术背景 笔者在执行一个Jax的任务中,又发现了一个奇怪的问题,就是明明只分配了很小的矩阵空间,但是在多次的任务执行之后,显存突然就爆了.而且此时已经按照Jax的官方说明配置了XLA_PYTHON_C ...

  2. Windwos堆管理体系以及溢出利用

    <0day安全>学习笔记,主要讨论WIndows2000~WIndowsSP1平台的堆管理策略. 0X01 堆与栈的区别 栈空间是在程序设计时已经规定好怎么使用,使用多少内存空间.典型的栈 ...

  3. Python pyecharts绘制仪表盘

    一.仪表盘gauge.add方法简介 gauge.add()方法签名 add(name,attr,value, scale_range=none, angle_range=none,**kwargs) ...

  4. Table.Group分组…Group(Power Query 之 M 语言)

    数据源: 10列55行数据,其中包括含有重复项的"部门"列和可求和的"金额"列. 目标: 按"部门"列进行分组,显示各部门金额小计. 操作过 ...

  5. 升级过log4j,却还没搞懂log4j漏洞的本质?

    摘要:log4j远程代码漏洞问题被大范围曝光后已经有一段时间了,今天完整讲清JNDI和RMI以及该漏洞的深层原因. 本文分享自华为云社区<升级过log4j,却还没搞懂log4j漏洞的本质?为你完 ...

  6. CF1065A Vasya and Chocolate 题解

    Content 小 V 有 \(s\) 块钱,商店里有巧克力卖,每块巧克力 \(c\) 块钱,现在商店给出优惠:购买 \(a\) 块巧克力可以免费获得 \(b\) 块巧克力,求小 V 最多能够买到的巧 ...

  7. mysql 连接数过多内存增长过快

    mysql连接允许长连接和短链接,但是本身建立连接会有很大开销所以一般连接mysql会使用长连接.但是全部是使用长连接后,可能会出现mysql有时占用内存涨的特别快,这是因为mysql在执行过程中临时 ...

  8. 数据改变认知——不知怎么选,用RFM模型看舔狗质量!

    假设我长得很漂亮,拥有众多追求者,但是初出闺房的我对这世界上的男人毫无认知,那么该如何选择呢?这真是一个问题! 妈妈说,愿意为我花钱的男人未必爱我,但不愿意为我花钱的男人必定不爱我,而后传授了一套RF ...

  9. HttpServletResponse工具类和HttpServletRequest工具类,前台参数接收方式和后台返回(JSON)数据格式

    RequestUtils.java 操作类 package cn.utils; import org.apache.commons.lang3.StringUtils; import org.slf4 ...

  10. 自动化中不能犯的4个RPA错误-RPA学习天地

    自动化在客户支持中的使用预计在未来几年会加速. 根据Dimension Research的数据,2022年72%的客户互动将通过机器人流程自动化(RPA)等新兴技术进行.电话互动将从41%下降到12% ...