building Python from source with zlib support

后端 未结 10 758
广开言路
广开言路 2020-11-28 04:18

When building Python 3.2.3 from source on Ubuntu 12.04, the zlib module is not available.

I downloaded the official source distribution from python.org, and attempte

10条回答
  •  温柔的废话
    2020-11-28 05:12

    I had a similar problem on CentOS 6.3 and python 3.2.3

    I solved it by:

    Edit /Modules/Setup and uncomment the line:

    zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
    

    change to directory /Modules/zlib:

    ./configure
    make
    sudo make install
    

    then compiled my python3.2 source.

    and was then able to test import zlib and it all worked fine :)

提交回复
热议问题