On 08/23/2018 12:43 AM, jacob m wrote:
> " import zlib
> print(zlib.__file__)"
>
> When I don't have the zlib uploaded to my Python3.7 library, I have the
> following error:
> "Traceback (most recent call last):
> File "./testx.py", line 2, in <module>
> import zlib
> ModuleNotFoundError: No module named 'zlib'"
zlib is part of the standard library. It should have been there when you
installed Python.
> When I download the zlib 1.2.11 from
http://www.zlib.net/, rename the
> "zlib-1.2.11" folder into "zlib" (after unpacking) and upload it into
> Python library, the result is:
Don't do that.
* that's not a Python package. It has no business being in the Python
path.
* don't put things into the Python path willy-nilly. Let the canonical
tools (i.e.: pip, setup.py files, etc.) take care of it.
* DEFINITELY don't put your own stuff into the *standard* library
location. Use site-packages/ for custom packages.
Install Python again from scratch. If you can't import zlib and zipfile
in a *clean* Python install, come back and tell us how you installed
Python and what OS/distribution you're using. Then I'm sure we can help
you figure out what went wrong.
If you installed from source and you didn't have zlib headers installed
at the time, I could imagine this happening... but I have no idea if
Python would even build without zlib.
-- Thomas
> "# ./testx.py
> None
> "
> In the second case I still have the AttributeError with crc32.
>
>
>
> On 22 August 2018 at 23:09, Ashok Arora <
ashok.m...@gmail.com> wrote:
>