基于此zlib-install-on-python ,我需要运行以下命令
./configure –with-zlib=/usr/include
问题:在哪里可以找到python 3.2中的配置?
user@ubuntu:~$ ls /usr/include/z* /usr/include/zconf.h /usr/include/zlibdefs.h /usr/include/zlib.h
user@ubuntu:~/Downloads/Python-3.2$ ./configure –with-zlib=/usr/include
configure: error: invalid variable name: `–with-zlib'
最佳答案
您需要在 python 安装目录中运行 ./configure
。这是您解压源 tarball 的位置。
cd /path/to/python3.2
./configure --with-zlib=/usr/include
请注意,--with-zlib
参数的前缀是两个破折号,而不是一个。
编辑:
来自./configure -h
,
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
尝试./configure --with-zlib=yes
(也会产生错误)后,我认为PACKAGE
可能是一个非标准包。但是,要解决您的问题(确保 python 有 zlib),您应该能够执行 ./configure;制作; sudo make install
。您显示您有 zlib.h
,因此应该重新安装支持 zlib 的 python。我会看看是否可以找到有关 --with-PACKAGE
选项的更多信息,但这应该可以解决根本问题。
关于python-3.x - 我在哪里可以找到 ./configure 来运行 python 3.2 中的命令 ./configure –with-zlib=/usr/include,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7731545/