fadora24安装settools,pip包出错解决方法

1、fadora24安装Python2.7

  

 1 [[email protected] ~]# python
 2 bash: python: 未找到命令...
 3 安装软件包“python”以提供命令“python”? [N/y] n
 4
 5 wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz
 6
 7 tar xf Python-2.7.12.tgz
 8
 9 cd  Python-2.7.12
10
11 ./configura
12
13 make
14
15 make install

2、安装settools包,pip包

 1 creating ‘dist/setuptools-25.1.6-py2.7.egg‘ and adding ‘build/bdist.linux-x86_64/egg‘ to it
 2 Traceback (most recent call last):
 3   File "setup.py", line 194, in <module>
 4     dist = setuptools.setup(**setup_params)
 5   File "/usr/local/lib/python2.7/distutils/core.py", line 151, in setup
 6     dist.run_commands()
 7   File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
 8     self.run_command(cmd)
 9   File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
10     cmd_obj.run()
11   File "/software/setuptools-25.1.6/setuptools/command/install.py", line 67, in run
12     self.do_egg_install()
13   File "/software/setuptools-25.1.6/setuptools/command/install.py", line 109, in do_egg_install
14     self.run_command(‘bdist_egg‘)
15   File "/usr/local/lib/python2.7/distutils/cmd.py", line 326, in run_command
16     self.distribution.run_command(command)
17   File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
18     cmd_obj.run()
19   File "/software/setuptools-25.1.6/setuptools/command/bdist_egg.py", line 223, in run
20     dry_run=self.dry_run, mode=self.gen_header())
21   File "/software/setuptools-25.1.6/setuptools/command/bdist_egg.py", line 465, in make_zipfile
22     z = zipfile.ZipFile(zip_filename, mode, compression=compression)
23   File "/usr/local/lib/python2.7/zipfile.py", line 736, in __init__
24     "Compression requires the (missing) zlib module"
25 RuntimeError: Compression requires the (missing) zlib module

解决方法:yum install zlib zlib-devel -y ,重新安装Python,进入Python安装包,执行 make, make install.

 1 [[email protected] pip-8.1.2]# which pip
 2 /usr/local/bin/pip
 3 [[email protected] pip-8.1.2]#
 4 [[email protected] pip-8.1.2]#
 5 [[email protected] pip-8.1.2]# pip -V
 6 Traceback (most recent call last):
 7   File "/usr/local/bin/pip", line 9, in <module>
 8     load_entry_point(‘pip==8.1.2‘, ‘console_scripts‘, ‘pip‘)()
 9   File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 542, in load_entry_point
10   File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2570, in load_entry_point
11   File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2230, in load
12   File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2236, in resolve
13   File "/usr/local/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg/pip/__init__.py", line 16, in <module>
14     from pip.vcs import git, mercurial, subversion, bazaar  # noqa
15   File "/usr/local/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg/pip/vcs/subversion.py", line 9, in <module>
16     from pip.index import Link
17   File "/usr/local/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg/pip/index.py", line 30, in <module>
18     from pip.wheel import Wheel, wheel_ext
19   File "/usr/local/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg/pip/wheel.py", line 39, in <module>
20     from pip._vendor.distlib.scripts import ScriptMaker
21   File "/usr/local/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg/pip/_vendor/distlib/scripts.py", line 14, in <module>
22     from .compat import sysconfig, detect_encoding, ZipFile
23   File "/usr/local/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg/pip/_vendor/distlib/compat.py", line 31, in <module>
24     from urllib2 import (Request, urlopen, URLError, HTTPError,
25 ImportError: cannot import name HTTPSHandler

解决方法:yum install openssl openssl-devel -y , 重新安装Python,然后再安装pip 即可

时间: 2024-10-08 16:58:52

fadora24安装settools,pip包出错解决方法的相关文章

Android - &quot;已安装了存在签名冲突的同名数据包&quot;,解决方法!

错误提示:已安装了存在签名冲突的同名数据包. 解决方法:打开Android Studio,打开logcat,用usb线连接你出错的手机,识别出手机之后,在你的项目后面,点击"run"按钮,随后AS会提示你,你删除先前安装的APP就可以了! 原文地址:https://www.cnblogs.com/sunylat/p/9962767.html

安装MySQldb出错解决方法

sudo yum install mysql-devel sudo yum install python-devel _mysql.c:36:23: error: my_config.h: No such file or directory _mysql.c:38:19: error: mysql.h: No such file or directory _mysql.c:39:26: error: mysqld_error.h: No such file or directory _mysql

$ sudo python -m pip install pylint 出错解决方法

问题:在unbuntu执行$ sudo python -m pip install pylint出错解决方法支行以下命令sudo pip install pylint==1.9.3这样roboware_studio 也是可以跑python的 原文地址:https://www.cnblogs.com/dayspring/p/9764650.html

.net安装部署“Error 1001 在初始化安装时发生异常” 的解决方法

状况描述:打包安装后,如果删除安装目录中的某个文件,这时从桌面快捷方式启动软件系统会自动运行修复程序,此时因为路径问题会报出"错误 1001 在初始化安装时发生异常xxx"的异常.(前提是你的安装部署中加入了"自定义操作",并为其传值). 查找原因原来是"自定义操作"中CustomActionData值有误造成.未出错前的CustomActionData. /DbName=[DBNAME] /ServerName=[SERVERNAME] /Us

vs连接mysql出错解决方法

vs连接mysql出错解决方法 先按下面的步骤配置一下: **- (1)打开VC6.0 工具栏Tools菜单下的Options选项,在Directories的标签页中右边的"Show directories for:"下拉列表中选中"Includefiles",然后在中间列表框中添加你本地安装MySQL的include目录路径.(我的是D:\Program Files\MySQL\MySQL Server 5.0\include). vs2010中的设置,在:项目-

Windows Server 2012启用Windows功能NetFx3时出错解决方法

作者:冰点阳光 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明网址:http://baohua.me/operating-system/windows-server-2012-enable-windows-feature-netfx3-error-sulotion/ 在Windows server 2012 R2服务器上安装SQL Server 2012数据库,在安装过程中出现"启用Windows 功能NetFx3时出错,错误代码:-2146498298.请尝试从Wind

ElasticSearch 安装时一些错误以及解决方法

第1章 ElasticSearch 安装时一些错误以及解决方法 1.1 JDK版本问题 1.1.1 问题: [2020-01-16T09:26:22,296][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node-1] uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupException: org.elasticsearch.common.in

sun.misc.BASE64Encoder找不到包,解决方法

右键项目->属性->java bulid path->jre System Library->access rules->resolution选择accessible,下面填上** 点击确定即可 Jun-1: sun.misc.BASE64Encoder找不到jar包的解决方法 1.右键项目->属性->java bulid path->jre System Library->access rules->resolution选择accessible

Ubuntu Server 14.04 选择中文安装后日期乱码的解决方法

Ubuntu Server 14.04选择中文安装后,默认的/etc/default/locale会使某些中文日期乱码,执行ll和date可见. /etc/default/locale 原来内容为: LANG="zh_CN.UTF-8" LANGUAGE="zh_CN:zh" LC_NUMERIC="zh_CN" LC_TIME="zh_CN" LC_MONETARY="zh_CN" LC_PAPER=&q