Closed margusholland closed 6 years ago
I have the same problem!
[root@CentOS7 bin]# pip install pyminizip Collecting pyminizip Downloading http://mirrors.aliyun.com/pypi/packages/b0/73/00dd7403481dc726d52d3e3b2333f38c1574e2badd27921b931f46909891/pyminizip-0.2.2.tar.gz (122kB) 100% |████████████████████████████████| 122kB 1.7MB/s Installing collected packages: pyminizip Running setup.py install for pyminizip ... error Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-build-7b3MwA/pyminizip/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-jYsZfe-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_ext building 'pyminizip' extension creating build creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src creating build/temp.linux-x86_64-2.7/zlib123 gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc -Izlib123 -I/usr/include/python2.7 -c src/py_minizip.c -o build/temp.linux-x86_64-2.7/src/py_minizip.o gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc -Izlib123 -I/usr/include/python2.7 -c src/zip.c -o build/temp.linux-x86_64-2.7/src/zip.o In file included from src/zip.c:66:0: src/crypt.h:34:23: error: conflicting types for ‘z_crc_t’ typedef unsigned long z_crc_t; ^ In file included from /usr/include/zlib.h:34:0, from src/zip.c:36: /usr/include/zconf.h:409:17: note: previous declaration of ‘z_crc_t’ was here typedef Z_U4 z_crc_t; ^ error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-build-7b3MwA/pyminizip/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-jYsZfe-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-7b3MwA/pyminizip/ You are using pip version 8.1.2, however version 10.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
It should be ok with version 0.2.3. Can you try again?
Awesome, works with 0.2.3.
I’m running pyminizip on Heroku and while it’s working and installing perfectly when the runtime Python is set to 2.7.14 (which is now deprecated by Heroku), I cannot install is under Python 2.7.15.
Getting the following:
In file included from /app/.heroku/python/include/python2.7/Python.h:47:0, from src/py_minizip.c:17: src/crypt.h:35:53: error: unknown type name ‘z_crc_t’ static int decrypt_byte(unsigned long pkeys, const z_crc_t pcrc_32_tab) ^ src/crypt.h:48:52: error: unknown type name ‘z_crc_t’ static int update_keys(unsigned long pkeys, const z_crc_t pcrc_32_tab,int c) ^ src/crypt.h:65:71: error: unknown type name ‘z_crc_t’ static void init_keys(const char passwd, unsigned long pkeys, const z_crc_t pcrc_32_tab) ^ src/crypt.h:35:12: warning: ‘decrypt_byte’ defined but not used [-Wunused-function] static int decrypt_byte(unsigned long pkeys, const z_crc_t pcrc_32_tab) ^ src/crypt.h:65:13: warning: ‘init_keys’ defined but not used [-Wunused-function] static void init_keys(const char passwd, unsigned long pkeys, const z_crc_t pcrc_32_tab) ^ error: command 'gcc' failed with exit status 1