deepin安装Python3.8以及使用pip3遇到的问题
Tofloor
poster avatar
Jack
deepin
2020-03-26 09:06
Author
本帖最后由 pangjie 于 2020-3-26 01:21 编辑

求助帖

这个帖子算是记录自己折腾Python(失败)的记录:

因为学习缘故,需要使用Python3.8,但是deepin上已经预装Python2.7和Python3.5了,所以需要在deepin上安装Python3.8.安装过程按照这个帖子来的:(一)Linux下安装Python3.8安装完了以后,可以执行python3.8 和pip3,但是安装scrapy的时候,出现这个错误:

subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.(错误很长,这是最后一行)

具体是什么原因咱也不知道,百度一下:(二)pip 安装软件报错:这份解答下的评论是我评论的,我不明白楼主说的CommandNotFound文件夹在哪里。
这是上面这个问题的第一种解决方法,我没用它。
第二种方法很简单,(三)return Command 'lsb_release -a' ....说白了,直接到 /usr/bin/目录下删除。(这个回答下还有说是改文件的,我没有那个文件,无语)
删除完了以后,执行`pip3 install scrapy`命令,会有如下提示:
locations that require TLS/SSL, however the ssl module in Python is not available.
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting scrapy
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/scrapy/
  ...
  Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/scrapy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /simple/scrapy/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
  ERROR: Could not find a version that satisfies the requirement scrapy (from versions: none)
ERROR: No matching distribution found for scrapy
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

查询第一行错误后,找到一个链接:(四)WARNING: pip is configured with ... ,说白了,就是要在configure Python的时候,添加上ssl/openssl 路径。
配置openssl也遇到问题了(五)OpenSSL安装+not found (required by openssl),然而等我配置好openssl之后,仍然行不通。
现在我是彻底不会了,敢问社区里哪位老哥安装过第三个Python版本或者遇到我遇到的问题或者把(二)pip 安装软件报错:这个解答我下面的评论回复了。
感激不尽。
到最后,我的`pip3 install scrapy`还是不能用。心累,再不行就直接重装系统了。估计Python环境已经让我搞坏了。

两个吐槽:
1. CSDN、博客园、简书这三个平台的内容就是相互抄袭。有的创作者还美其名曰“转发质量博客”,就是这种创作者,导致我每个答案都翻遍了百度搜索的前三页。就是那几个答案相互转帖。浪费时间。用谷歌搜索出来的也是一堆转帖的。看得我头都大了。反倒是有的网站还有看起来比较靠谱的回答。v2ex和github 回答质量很精准,但是仍然没有解决问题。特别是github下pip官方的帖子,说是这个问题Python2.7发现了,下一个release修复,还是不行。

那些转发了别人帖子的,觉得很好,直接收藏就是了,非要转发的话,加一个仅自己可见也行啊。找问题的时候来来回回就是转发了那几个原创博主的帖子真的好烦。

2.回帖的奖励还有 税 吗?有意思。
(这篇帖子回帖3金币,只求有大佬出手相助)

Reply Favorite View the author
All Replies
2 / 2
To page
avatar
Jack
deepin
2020-05-19 01:13
#21
https://bbs.deepin.org/post/190109
所以你做开发的应该上ubuntu。deepin不是给开发者预备的东西,包太旧,碰上专业点的东西就很费劲。

...

实名羡慕,现在的V20 bata还是python3.7.3
Reply View the author
avatar
SamLukeYes
deepin
2020-05-19 01:32
#22
https://bbs.deepin.org/post/190109
实名羡慕,现在的V20 bata还是python3.7.3

现在ubuntu和manjaro默认的python都指向python3.8了,python2才指向python2.7
Reply View the author
avatar
leafgreen
deepin
2020-05-19 22:29
#23
https://bbs.deepin.org/post/190109
现在ubuntu和manjaro默认的python都指向python3.8了,python2才指向python2.7

我这里kubuntu20.04输入python还是python2,从19.10升级上来的
Reply View the author
avatar
leafgreen
deepin
2020-05-19 22:30
#24
想如果你不需要那么多软件,可以装miniconda
Reply View the author
avatar
leafgreen
deepin
2020-05-19 22:34
#25
https://bbs.deepin.org/post/190109
所以你做开发的应该上ubuntu。deepin不是给开发者预备的东西,包太旧,碰上专业点的东西就很费劲。

...

自带KDE Plasma  的kubuntu也不错
Reply View the author
avatar
SamLukeYes
deepin
2020-05-19 22:34
#26
https://bbs.deepin.org/post/190109
我这里kubuntu20.04输入python还是python2,从19.10升级上来的

额,是吗?我再去看看livecd里是怎样的
Reply View the author
avatar
SamLukeYes
deepin
2020-05-19 22:43
#27
https://bbs.deepin.org/post/190109
我这里kubuntu20.04输入python还是python2,从19.10升级上来的

我进 ubuntu mate 的live看了一下,没有python2,也没有python,只有python3。
Reply View the author
avatar
sinux
deepin
2020-05-19 23:22
#28
https://bbs.deepin.org/post/190109
我这里kubuntu20.04输入python还是python2,从19.10升级上来的

源里肯定没有了。你这是没处理干净
Reply View the author
avatar
leafgreen
deepin
2020-05-20 04:20
#29
https://bbs.deepin.org/post/190109
源里肯定没有了。你这是没处理干净

这个不太了解,后来在windows装了ubuntu20.04的时候发现没有自带python2。我觉得是20.04才去掉python2的
Reply View the author
avatar
sinux
deepin
2020-05-20 22:59
#30
https://bbs.deepin.org/post/190109
这个不太了解,后来在windows装了ubuntu20.04的时候发现没有自带python2。我觉得是20.04才去掉python2的 ...

对,就是20.04,python2,qt4,gtk2全铲了。
Reply View the author
2 / 2
To page