Skip to content

Installation on Windows #1

@Trigonometry

Description

@Trigonometry

At first I want to say thanks for this great improvement to directly fast-read and extract content-parts in huge gzip-compressed files. igzip.IndexedGzipFile() should be the new standard instead of gzip.open() Installation and testing on Linux works like a charm, but ...
I am mainly writing and testing python-programs on JetBrains pyCharm on a Windows platform but this specific python package fails either by directly adding the package to the project interpreter in pyCharm, or manually installing it on command line:

python -m pip install indexed-gzip
Collecting indexed-gzip
Using cached indexed_gzip-0.3.1.tar.gz
Building wheels for collected packages: indexed-gzip
Running setup.py bdist_wheel for indexed-gzip ... error
Complete output from command C:\Python27\python.exe -u -c "import setuptools, tokenize;file='%APPDATA%\local\temp\pip-build-d9mi7z\indexed-gzip\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replac
e('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d %APPDATA%\local\temp\tmpqdae
xbpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
building 'indexed_gzip' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
%APPDATA%\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tcindexed_gzip.c /Fobuild\temp.win32-2.7\Release\indexed_gzip.obj -Wno-unused-function
cl : Command line error D8021 : invalid numeric argument '/Wno-unused-function'
error: command '%APPDATA%\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2
...

Extracting the latest indexed_gzip-master.zip from GitHub and commenting out the -Wno-unused-function parameter for directly pip installing from folder fails during compiling zran.c

python -m pip install -e ./indexed_gzip
Obtaining file:///C:/Temp/indexed_gzip
Installing collected packages: indexed-gzip
Running setup.py develop for indexed-gzip
Complete output from command C:\Python27\python.exe -c "import setuptools, tokenize;file='C:\Temp\indexed_gzip\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, _file
_, 'exec'))" develop --no-deps:
running develop
running egg_info
writing indexed_gzip.egg-info\PKG-INFO
writing top-level names to indexed_gzip.egg-info\top_level.txt
writing dependency_links to indexed_gzip.egg-info\dependency_links.txt
reading manifest file 'indexed_gzip.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'bench_plot.py'
warning: no previously-included files found matching 'benchmark_indexed_gzip.py'
writing manifest file 'indexed_gzip.egg-info\SOURCES.txt'
running build_ext
building 'indexed_gzip' extension
%APPDATA%\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC \Tcindexed_gzip.c /Fobuild\temp.win32-2.7\Release\indexed_gzip.obj
indexed_gzip.c
%APPDATA%\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\stdint.h(268) : warning C4005: 'SIZE_MAX' : macro redefinition
%APPDATA%\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\limits.h(84) : see previous definition of 'SIZE_MAX'
indexed_gzip.c(1702) : warning C4244: 'function' : conversion from 'long' to 'uint16_t', possible loss of data
indexed_gzip.c(3866) : warning C4244: 'function' : conversion from 'int64_t' to 'Py_ssize_t', possible loss of data
%APPDATA%\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tczran.c /Fobuild\temp.win32-2.7\Release\zran.obj
zran.c
%APPDATA%\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\stdint.h(268) : warning C4005: 'SIZE_MAX' : macro redefinition
%APPDATA%\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\limits.h(84) : see previous definition of 'SIZE_MAX'
zran.c(468) : warning C4013: 'fcntl' undefined; assuming extern returning int
zran.c(468) : error C2065: 'F_GETFL' : undeclared identifier
zran.c(468) : error C2065: 'O_ACCMODE' : undeclared identifier
zran.c(474) : warning C4013: 'fseeko' undefined; assuming extern returning int
zran.c(477) : warning C4013: 'ftello' undefined; assuming extern returning int
zran.c(497) : warning C4244: '=' : conversion from 'int64_t' to 'size_t', possible loss of data
zran.c(501) : warning C4013: 'round' undefined; assuming extern returning int
zran.c(540) : error C2143: syntax error : missing ';' before 'type'
zran.c(543) : error C2065: 'new_list' : undeclared identifier
zran.c(543) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
zran.c(547) : error C2065: 'new_list' : undeclared identifier
zran.c(547) : warning C4047: '=' : 'zran_point_t *' differs in levels of indirection from 'int'
zran.c(559) : error C2143: syntax error : missing ';' before 'type'
zran.c(561) : error C2065: 'new_list' : undeclared identifier
zran.c(561) : warning C4047: '=' : 'int' differs in levels of indirection from 'void *'
zran.c(563) : error C2065: 'new_list' : undeclared identifier
zran.c(563) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
zran.c(567) : error C2065: 'new_list' : undeclared identifier
zran.c(567) : warning C4047: '=' : 'zran_point_t *' differs in levels of indirection from 'int'
zran.c(630) : warning C4244: '=' : conversion from 'uint64_t' to 'uint32_t', possible loss of data
zran.c(870) : warning C4244: '=' : conversion from 'double' to 'uint64_t', possible loss of data
zran.c(871) : warning C4244: '=' : conversion from 'double' to 'uint64_t', possible loss of data
zran.c(924) : error C2143: syntax error : missing ';' before 'type'
zran.c(925) : error C2275: 'zran_point_t' : illegal use of this type as an expression
c:\temp\indexed_gzip\zran.h(22) : see declaration of 'zran_point_t'

zran.c(925) : error C2065: 'next' : undeclared identifier
zran.c(943) : error C2065: 'point_data' : undeclared identifier
zran.c(943) : warning C4047: '=' : 'int' differs in levels of indirection from 'void *'
zran.c(946) : error C2065: 'point_data' : undeclared identifier
zran.c(946) : warning C4047: '=' : 'int' differs in levels of indirection from 'void *'
zran.c(947) : error C2065: 'point_data' : undeclared identifier
zran.c(947) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
zran.c(951) : error C2065: 'next' : undeclared identifier
zran.c(951) : warning C4047: '=' : 'int' differs in levels of indirection from 'zran_point_t *'
zran.c(952) : error C2065: 'next' : undeclared identifier
zran.c(952) : error C2223: left of '->bits' must point to struct/union
zran.c(953) : error C2065: 'next' : undeclared identifier
zran.c(953) : error C2223: left of '->cmp_offset' must point to struct/union
zran.c(954) : error C2065: 'next' : undeclared identifier
zran.c(954) : error C2223: left of '->uncmp_offset' must point to struct/union
zran.c(955) : error C2065: 'next' : undeclared identifier
zran.c(955) : error C2223: left of '->data' must point to struct/union
zran.c(955) : error C2065: 'point_data' : undeclared identifier
zran.c(969) : error C2065: 'point_data' : undeclared identifier

zran.c(969) : warning C4022: 'memcpy' : pointer mismatch for actual parameter 1
zran.c(977) : error C2065: 'point_data' : undeclared identifier
zran.c(977) : warning C4022: 'memcpy' : pointer mismatch for actual parameter 1
zran.c(981) : error C2065: 'point_data' : undeclared identifier
zran.c(981) : warning C4022: 'memcpy' : pointer mismatch for actual parameter 1
zran.c(1001) : error C2065: 'point_data' : undeclared identifier
zran.c(1001) : warning C4047: '!=' : 'int' differs in levels of indirection from 'void *'
zran.c(1002) : error C2065: 'point_data' : undeclared identifier
zran.c(1002) : warning C4022: 'free' : pointer mismatch for actual parameter 1
zran.c(1038) : warning C4244: '=' : conversion from 'uint64_t' to 'off_t', possible loss of data
zran.c(1599) : warning C4244: '=' : conversion from 'uint64_t' to 'size_t', possible loss of data
zran.c(2006) : warning C4244: '+=' : conversion from 'uint64_t' to 'off_t', possible loss of data
zran.c(2025) : warning C4244: '=' : conversion from 'uint64_t' to 'off_t', possible loss of data
zran.c(2058) : warning C4244: 'return' : conversion from 'uint64_t' to 'long', possible loss of data
zran.c(2155) : warning C4244: 'function' : conversion from 'uint64_t' to 'size_t', possible loss of data
zran.c(2165) : warning C4244: '=' : conversion from 'uint64_t' to 'off_t', possible loss of data
zran.c(2166) : warning C4244: '=' : conversion from 'uint64_t' to 'off_t', possible loss of data
zran.c(2214) : warning C4244: 'function' : conversion from 'uint64_t' to 'uint32_t', possible loss of data
zran.c(2294) : warning C4244: 'function' : conversion from 'uint64_t' to 'uint32_t', possible loss of data
zran.c(2295) : error C2036: 'void *' : unknown size
error: command '%APPDATA%\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

Environment:
°°°°°°°°°°°°°°°°
pyCharm 2016.2.3
python 2.7.8
numpy 1.12.1 (above requirements)
cython 0.25.2 (above requirements)
Visual C++ 9.0 Compiler for Python 2.7
Win7 Ultimate 32bit (don't laugh)

Hope you have an idea how to solve this issue to get indexed-gzip installed and running on Windows too since there are sadly no pre-compiled windows binaries provided for this specific package on Christoph Golhkes' "Unofficial Windows Binaries for Python Extension Packages" website (yet). Thanks for the great work and keep it up .. :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions