zpifile.py error - no crc 32 attribute

2018-08-22 Thread jacob m
 Hi guys,
I have a problem with zipfile and zlib module, and hope to get some help.

That's my error:
"import zipfile
  File "/home/lib/python3.7/lib/python3.7/zipfile.py", line 19, in 
crc32 = zlib.crc32
AttributeError: module 'zlib' has no attribute 'crc32' "

I have no idea what to do with that :/ I use this version of zipfile:
https://github.com/python/cpython/blob/3.7/Lib/zipfile.py

Somebody knows how to solve it?
Regards
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: zpifile.py error - no crc 32 attribute

2018-08-22 Thread jacob m
 Hi,
" Is there perhaps a different zlib on
your path, hiding the real zlib?" - I'm unsure of that.

"sudo apt-get install zlib1g-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
zlib1g-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded."
Regards


On 22 August 2018 at 13:12, jacob m  wrote:

> Hi guys,
> I have a problem with zipfile and zlib module, and hope to get some help.
>
> That's my error:
> "import zipfile
>   File "/home/lib/python3.7/lib/python3.7/zipfile.py", line 19, in
> 
> crc32 = zlib.crc32
> AttributeError: module 'zlib' has no attribute 'crc32' "
>
> I have no idea what to do with that :/ I use this version of zipfile:
> https://github.com/python/cpython/blob/3.7/Lib/zipfile.py
>
> Somebody knows how to solve it?
> Regards
>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: zpifile.py error - no crc 32 attribute

2018-08-22 Thread jacob m
" 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 
import zlib
ModuleNotFoundError: No module named 'zlib'"

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:
"# ./testx.py
None
"
In the second case I still have the AttributeError with crc32.



On 22 August 2018 at 23:09, Ashok Arora  wrote:

> Test this in the interpreter:-
>
> import zlib
>     zlib.__file__
>
> It will return the location of zlib module.
>
> On 8/22/18, jacob m  wrote:
> >  Hi,
> > " Is there perhaps a different zlib on
> > your path, hiding the real zlib?" - I'm unsure of that.
> >
> > "sudo apt-get install zlib1g-dev
> > Reading package lists... Done
> > Building dependency tree
> > Reading state information... Done
> > zlib1g-dev is already the newest version.
> > 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded."
> > Regards
> >
> >
> > On 22 August 2018 at 13:12, jacob m  wrote:
> >
> >> Hi guys,
> >> I have a problem with zipfile and zlib module, and hope to get some
> help.
> >>
> >> That's my error:
> >> "import zipfile
> >>   File "/home/lib/python3.7/lib/python3.7/zipfile.py", line 19, in
> >> 
> >> crc32 = zlib.crc32
> >> AttributeError: module 'zlib' has no attribute 'crc32' "
> >>
> >> I have no idea what to do with that :/ I use this version of zipfile:
> >> https://github.com/python/cpython/blob/3.7/Lib/zipfile.py
> >>
> >> Somebody knows how to solve it?
> >> Regards
> >>
> >>
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: zpifile.py error - no crc 32 attribute

2018-08-24 Thread jacob m
Hi all,
Thanks for your help, I reinstalled my Python and now it seems to be
working :)
Before building Python3 i uncommented:
#zlib zlibmodule.c -I$(prefix)/include
in Modules/Setup.dist and then I enabled ipv6 during the configuration.
Regards

On Thu, 23 Aug 2018 at 01:59, MRAB  wrote:

> On 2018-08-22 23:43, 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 
> >  import zlib
> > ModuleNotFoundError: No module named 'zlib'"
> >
> > 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:
> > "# ./testx.py
> > None
> > "
> > In the second case I still have the AttributeError with crc32.
> >
> In the first case, without the downloaded zlip, can you import zipfile?
>
> If yes, try:
>
> zipfile.zlib
>
>  From what I've seen, zlib is a built-in.
> >
> >
> > On 22 August 2018 at 23:09, Ashok Arora 
> wrote:
> >
> >> Test this in the interpreter:-
> >>
> >> import zlib
> >> zlib.__file__
> >>
> >> It will return the location of zlib module.
> >>
> >> On 8/22/18, jacob m  wrote:
> >> >  Hi,
> >> > " Is there perhaps a different zlib on
> >> > your path, hiding the real zlib?" - I'm unsure of that.
> >> >
> >> > "sudo apt-get install zlib1g-dev
> >> > Reading package lists... Done
> >> > Building dependency tree
> >> > Reading state information... Done
> >> > zlib1g-dev is already the newest version.
> >> > 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded."
> >> > Regards
> >> >
> >> >
> >> > On 22 August 2018 at 13:12, jacob m  wrote:
> >> >
> >> >> Hi guys,
> >> >> I have a problem with zipfile and zlib module, and hope to get some
> >> help.
> >> >>
> >> >> That's my error:
> >> >> "import zipfile
> >> >>   File "/home/lib/python3.7/lib/python3.7/zipfile.py", line 19, in
> >> >> 
> >> >> crc32 = zlib.crc32
> >> >> AttributeError: module 'zlib' has no attribute 'crc32' "
> >> >>
> >> >> I have no idea what to do with that :/ I use this version of zipfile:
> >> >> https://github.com/python/cpython/blob/3.7/Lib/zipfile.py
> >> >>
> >> >> Somebody knows how to solve it?
> >> >> Regards
> >> >>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


gmpy2 problem

2018-11-01 Thread jacob m
Hi guys
I have some problems with gmpy2 module installation - pip install gmpy2
doesn't work for me
[image: image.png]

How to fix it?
Regards
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: gmpy2 problem

2018-11-05 Thread jacob m
Sorry Rhodri, my gmail set your email as default recipient when I was
responding, I forgot to change that. Sorry for that
Regards

On Mon, 5 Nov 2018 at 13:06, Rhodri James  wrote:

> Jacob, please reply to the list, not to me personally.  As I said, I
> have no idea about gmpy2 or pip, I just know how to google.
>
> On 01/11/2018 23:28, jacob m wrote:
> > I tried to install libgmp3-dev, but it didn't solved my problem
> >
> > On Thu, 1 Nov 2018 at 18:44, Rhodri James  wrote:
> >
> >> Replying to the list since I have absolutely no idea about gmpy2 or
> pip...
> >>
> >> On 01/11/2018 16:56, jacob m wrote:
> >>> Hi Rodhri, of course I can paste the text :)
> >>> "
> >>> creating build
> >>>   creating build/temp.linux-x86_64-3.7
> >>>   creating build/temp.linux-x86_64-3.7/src
> >>>   gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g
> -fwrapv
> >> -O3
> >>> -Wall -fPIC -DWITHMPFR -DWITHMPC
> -I/home/lib/python3.7/include/python3.7m
> >>> -c src/gmpy2.c -o build/temp.linux-x86_64-3.7/src/gmpy2.o
> >>>   In file included from src/gmpy2.c:426:0:
> >>>   src/gmpy.h:106:12: fatal error: gmp.h: No such file or directory
> >>>#  include "gmp.h"
> >>>   ^~~
> >>>   compilation terminated.
> >>>   error: command 'gcc' failed with exit status 1
> >>>
> >>>   
> >>> Command "/home/lib/python3.7/bin/python3.7 -u -c "import setuptools,
> >>>
> >>
> tokenize;__file__='/tmp/pip-install-kiqba_j_/gmpy2/setup.py';f=getattr(tokenize,
> >>> 'open', open)(__file__);code=f.read().replace('\r\n',
> >>> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
> >>> /tmp/pip-record-2jatj1mi/install-record.txt
> >>> --single-version-externally-managed --compile" failed with error code 1
> >> in
> >>> /tmp/pip-install-kiqba_j_/gmpy2/
> >>> "
> >>
> >> A little googling suggests that you need to install the libgmp3-dev
> >> package:
> >>
> >> $ sudo apt install libgmp3-dev
> >>
> >>> On Thu, 1 Nov 2018 at 16:46, Rhodri James 
> wrote:
> >>>
> >>>> On 01/11/2018 14:40, jacob m wrote:
> >>>>> Hi guys
> >>>>> I have some problems with gmpy2 module installation - pip install
> gmpy2
> >>>>> doesn't work for me
> >>>>> [image: image.png]
> >>>>>
> >>>>> How to fix it?
> >>>>
> >>>> Hi Jacob,
> >>>>
> >>>> I'm afraid the screen-shot that you sent was automatically stripped
> off
> >>>> by the mailing list.  Could you copy the error text (preferably
> >>>> cut-and-paste the whole thing rather than retyping!)?  The more
> >>>> information you can give us, the better the advice will be from the
> >>>> people who actually understand pip :-)
> >>
> >>
> >> --
> >> Rhodri James *-* Kynesim Ltd
> >> --
> >> https://mail.python.org/mailman/listinfo/python-list
> >>
> >
>
>
> --
> Rhodri James *-* Kynesim Ltd
>
-- 
https://mail.python.org/mailman/listinfo/python-list