[Tutor] Issue with zlib module
Mats Wichmann
mats at wichmann.us
Fri Jan 10 13:44:19 EST 2025
On 1/10/25 00:25, rohan vaidya via Tutor wrote:
> Hi all,
>
> I am trying to create virtual environments to install python 3.9.21 but
> facing issue with zlib
>
> Error as - modulenotfounderror no module named zlib
>
> Can anymore please help in resolving this issue ?
zlib is a binary module, not a pure Python one. It needs a shared
library that patches the Python version, which should be getting
installed when you install Python.
Can you say a bit more about what you're doing? What's your platform?
Are you downloading a prebuilt Python 3.9 or building your own? On
Linux at least, building the library (which will end up with a name like
zlib.cpython-39-x86_64-linux-gnu.so) should work because cpython
"vendors" it - that is, includes the source code in the cpython source
bundle, and will use that unless the system zlib (and associated
development kit) is usable for the build.
More information about the Tutor
mailing list