python安装途中遇到的问题和解决方法

更新时间:2023-06-27 17:18:27 阅读: 评论:0

python安装途中遇到的问题和解决⽅法
⼀、tuptools安装错误:RuntimeError: Compression requires the (missing) zlib module
人口最多的省区1. 描述
搞了个腾讯云的服务器,闲在⼿上没事准备当个测试机⽤⽤,写写代码什么的。然后按照之前写的⽂章安装了python2.7,安装的中途出现了⼀个错误:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46running install
running bdist_egg
山东多大面积
running egg_info
writing requirements -
阿拉的海
-info/PKG-INFO
writing top-level names -info/
writing dependency_links -info/
writing entry points -info/
reading manifest file "-"
reading manifest template "MANIFEST.in"
warning: no files found matching "*" under directory "tuptools/_vendor"
writing manifest file "-"
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO - -> build/bdist.linux-x86_64/egg/EGG-INFO -info/ -> build/bdist.linux-x86_64/egg/EGG-INFO copying tupto
<-info/ -> build/bdist.linux-x86_64/egg/EGG-INFO - -> build/bdist.linux-x86_64/egg/EGG-INFO -info/ -> build/bdist.linux-x86_64/egg/EGG-INFO creating "dist/tuptools-36.6." and adding "build/bdist.linux-x86_64/egg" to it Traceback (most recent call last):
关牧村简历
File "tup.py", line 188, in <module>
dist = tuptools.tup(**tup_params)
File "/usr/local/python27/lib/python2.7/distutils/core.py", line 151, in tup
dist.run_commands()
File "/usr/local/python27/lib/python2.7/distutils/dist.py", line 953, in run_commands
lf.run_command(cmd)
File "/usr/local/python27/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/data/tuptools-36.6.0/tuptools/command/install.py", line 67, in run
lf.do_egg_install()
File "/data/tuptools-36.6.0/tuptools/command/install.py", line 109, in do_egg_install
lf.run_command("bdist_egg")
新年的钟声File "/usr/local/python27/lib/python2.7/distutils/cmd.py", line 326, in run_command
lf.distribution.run_command(command)
File "/usr/local/python27/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/data/tuptools-36.6.0/tuptools/command/bdist_egg.py", line 231, in run
dry_run=lf.dry_run, _header())
File "/data/tuptools-36.6.0/tuptools/command/bdist_egg.py", line 473, in make_zipfile    z = zipfile.ZipFile(zip_filename, mode, compression=compression)
File "/usr/local/python27/lib/python2.7/zipfile.py", line 736, in __init__
"Compression requires the (missing) zlib module"
RuntimeError: Compression requires the (missing) zlib module
其实错误⼀眼就能看出是缺少了zlib库,然后使⽤yum install zlib zlib-devel安装了库之后python tup.py install发现还是⼀样报错。
2. 解决⽅法
装好zlib相关库之后把把python重新安装⼀遍,进⼊到源码⽬录:
1yum install zlib zlib-devel
2make && make install
⼆、tuptools错误:pkg_resources.DistributionNotFound: The "distribute==0.6.10" distribution was not found and is required by the application    [2017-10-21添加]
1. 描述
安装完tuptools准备使⽤时报错:
1 2 3 4 5 6 7 8 9 10Traceback (most recent call last):
File "/usr/bin/easy_install", line 5, in <module>
from pkg_resources import load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3142, in <module>
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3126, in _call_aside
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3155, in _initialize_master_working_t
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 666, in _build_master
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 679, in _build_from_requirements
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 867, in resolve
pkg_resources.DistributionNotFound: The "distribute==0.6.10" distribution was not found and is required by the application
2. 解决⽅法
缺少distribute模块,使⽤pip安装也装不上,需要在官⽹下载源码安装。
1 2 3 4wget pypi.python/packages/source/d/distribute/distribute-0.6. tar -zxvf distribute-0.6.
cd distribute-0.6.10
关于长征的诗句python tup.py install
三、pip报错:pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.    [2017-10-21添加]二年级故事大全
1. 错误描述
使⽤pip安装shadowsocks的时候报错:
1 2 3 4 5pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
兔和蛇Collecting shadowsocks
Could not fetch URL pypi.python/simple/shadowsocks/: There was a problem confirming the ssl certificate: Can"t connect to HTTPS URL becau the SSL module is not available. - skipping
Could not find a version that satisfies the requirement shadowsocks (from versions: )
No matching distribution found for shadowsocks
2. 解决⽅法
系统缺少openssl-devel包,使⽤yum install openssl-devel安装。
然后重新安装python:进⼊python源码⽬录,make && make install,解决。

本文发布于:2023-06-27 17:18:27,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1057491.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:安装   缺少   准备   错误   报错   问题   下载   遇到
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图