yangtaozhi的个人博客分享 http://blog.sciencenet.cn/u/yangtaozhi

博文

python3安装时出现的问题

已有 7681 次阅读 2021-2-22 17:07 |系统分类:科研笔记

python3安装时,make install时经常会出现这样的错误:

subprocess.CalledProcessError: Command ‘(‘lsb_release’, ‘-a’)’ returned non-zero exit status 1.

其解决方法方法如下:
find / -name lsb_release
rm -rf /usr/bin/lsb_release

重新编译make install即可。


根据以下链接可以成功安装python3.6.8。

https://blog.csdn.net/fjl19900121/article/details/90941213


pip3安装numpy时(pip3 install numpy)出现如下错误:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting numpy
  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/numpy/
  Retrying (Retry(total=3, 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/numpy/
  Retrying (Retry(total=2, 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/numpy/
  Retrying (Retry(total=1, 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/numpy/
  Retrying (Retry(total=0, 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/numpy/
  Could not fetch URL https://pypi.org/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/numpy/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
  Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', 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

解决办法:

sudo pip3 install selectivesearch -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

即可解决。



https://wap.sciencenet.cn/blog-807279-1273364.html

上一篇:Matlab合并多个文本文件
下一篇:如何计算日心儒略日HJD
收藏 IP: 117.32.155.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-26 15:15

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部