首页 技术 正文
技术 2022年11月14日
0 收藏 928 点赞 3,120 浏览 2097 个字

我的环境:

[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

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,488
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,903
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,736
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,487
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,127
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,289