我的环境:

[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. eclipse.ini顺序

    -vmargs需放在-Dfile.encoding=UTF-8之前,否则会出现乱码 举例: -startup plugins/org.eclipse.equinox.launcher_1.3.0.v2 ...

  2. 【力扣】19. 删除链表的倒数第 N 个结点

    给你一个链表,删除链表的倒数第 n 个结点,并且返回链表的头结点. 进阶:你能尝试使用一趟扫描实现吗? 示例 1: 输入:head = [1,2,3,4,5], n = 2输出:[1,2,3,5]示例 ...

  3. 05 - Vue3 UI Framework - Button 组件

    官网基本做好了,接下来开始做核心组件 返回阅读列表点击 这里 目录准备 在项目 src 目录下创建 lib 文件夹,用来存放所有的核心组件吧.然后再在 lib 文件夹下创建 Button.vue 文件 ...

  4. tcache poisoning(爆破stout获得libc并且熟练使用了realloc)

    这道题目帮助我学习了realloc这个函数,是一道十分经典的题目,我会尽量的把exp的每一步都说清楚 例行检查我就不放了 讲程序放入ida中 比较简单的流程,没有show功能,所有我们需要通过爆破st ...

  5. [BUUCTF]PWN1——test_your_nc

    [BUUCTF]PWN1-test_your_nc 题目网址:https://buuoj.cn/challenges#test_your_nc 步骤: 根据题目提示,nc一下靶场 2.nc连接上后ls ...

  6. AT2287 [ARC067B] Walk and Teleport 题解

    Content 一条直线上有 \(n\) 个城市,第 \(i\) 个城市的坐标为 \(x_i\).你在某一个城市内,每一次你可以按两种方式之一进行移动: 左右移动,每移动一个单位疲劳值增加 \(a\) ...

  7. LuoguP7222 [RC-04] 信息学竞赛 题解

    Content 给定一个角 \(\alpha\),求 \(\beta=90^\circ-\alpha\). 数据范围:\(\alpha\in[-2^{31},2^{31}-1]\). Solution ...

  8. Spring Boot整合Thymeleaf及Thymeleaf页面基本语法

    引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>sp ...

  9. 1246 - Colorful Board

    1246 - Colorful Board    PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB ...

  10. @Transactional 注解实现

    @Transactional注解简介 @Transactional是spring中声明式事务管理的注解配置方式,相信这个注解的作用大家都很清楚.@Transactional注解可以帮助我们把事务开启. ...