我应该为zlib模块重新安装python吗?
在Ubuntu系统中使用python3.3.2安装distribute-0.6.49时,遇到错误我应该为zlib模块重新安装python吗?,python,python-3.x,zlib,distribute,Python,Python 3.x,Zlib,Distribute,在Ubuntu系统中使用python3.3.2安装distribute-0.6.49时,遇到错误 "Compression requires the (missing) zlib module") RuntimeError: Compression requires the (missing) zlib module .................等等,然后是 "Compression requires the (missing) zlib module") RuntimeError: C
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module
.................等等,然后是
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module
我已经检查了以前需要安装zlib包的解决方案,但在此之前是否应该重新安装python?我不能在上面安装zlib吗
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module
如果需要重新安装python,我在哪里可以找到已经安装了zlib的python 3.3,以便我可以像往常一样安装python?如果您正在运行ubuntu,通常建议您使用软件包管理器提供的软件包。如果我没有记错的话,您可以通过
sudo apt get install python3
或使用软件中心获得python3,目前是3.3.1
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module
我有理由相信默认发行版包括zlib
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module
Python 3.3.1 (default, Apr 17 2013, 22:30:32)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import zlib
>>> exit()
要使用
zlib
支持编译Python,您需要安装,以便Python可以找到标题
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module
你需要重新安装源代码编译过的Python来实现这一点。Python是从源代码安装的还是从Ubuntu软件包安装的?从源代码看,Ubuntu默认有Python 2.7,但我是从源代码安装Python 3.3.2。在python3.3.1中,zlib已经可用了?你的意思是首先我应该在Python之前单独安装zlib1g dev软件包,然后安装python版本?是;否则python配置脚本将无法找到zlib包含文件。是这样吗?我刚才已经做了,但还是不能导入zlibNo,我不是这么说的。使用Ubuntu软件包管理器安装
zlib1g dev
,然后安装cd Python-3.3.0
,/configure--prefix=/opt/python3.3
,make
,sudo make install
。如果您也从源代码安装了zlib
,则需要将头位置添加到Python配置调用中;使用不需要的Ubuntu包(因为标题可以在标准位置找到)。
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module