Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install on Python 2.7.9 (x64) + Windows 7 x64 #13

Closed
nashv opened this issue Apr 29, 2015 · 6 comments
Closed

Cannot install on Python 2.7.9 (x64) + Windows 7 x64 #13

nashv opened this issue Apr 29, 2015 · 6 comments

Comments

@nashv
Copy link

nashv commented Apr 29, 2015

Log:

C:\Users\Nash>pip install openslide-python                                      
Collecting openslide-python                                                     
  Using cached openslide-python-1.1.0.tar.gz                                    
Requirement already satisfied (use --upgrade to upgrade): Pillow in d:\winpython
\python-2.7.9.amd64\lib\site-packages (from openslide-python)                   
Installing collected packages: openslide-python                                 
  Running setup.py install for openslide-python                                 
    Complete output from command D:\WinPython\python-2.7.9.amd64\python.exe -c "
import setuptools, tokenize;__file__='c:\\users\\nash\\appdata\\local\\temp\\pip
-build-89mzyi\\openslide-python\\setup.py';exec(compile(getattr(tokenize, 'open'
, open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --re
cord c:\users\nash\appdata\local\temp\pip-i496c8-record\install-record.txt --sin
gle-version-externally-managed --compile:                                       
    running install                                                             
    running build                                                               
    running build_py                                                            
    creating build                                                              
    creating build\lib.win-amd64-2.7                                            
    creating build\lib.win-amd64-2.7\openslide                                  
    copying openslide\deepzoom.py -> build\lib.win-amd64-2.7\openslide          
    copying openslide\lowlevel.py -> build\lib.win-amd64-2.7\openslide          
    copying openslide\_version.py -> build\lib.win-amd64-2.7\openslide          
    copying openslide\__init__.py -> build\lib.win-amd64-2.7\openslide          
    running build_ext                                                           
    building 'openslide._convert' extension                                     
    creating build\temp.win-amd64-2.7                                           
    creating build\temp.win-amd64-2.7\Release                                   
    creating build\temp.win-amd64-2.7\Release\openslide                         
    D:\WinPython\scripts\..\python-2.7.9.amd64\..\tools\mingw32\bin\gcc.exe -mdl
l -O -DMS_WIN64 -Wall -ID:\WinPython\python-2.7.9.amd64\include -ID:\WinPython\p
ython-2.7.9.amd64\PC -c openslide/_convert.c -o build\temp.win-amd64-2.7\Release
\openslide\_convert.o                                                           
    writing build\temp.win-amd64-2.7\Release\openslide\_convert.def             
    D:\WinPython\scripts\..\python-2.7.9.amd64\..\tools\mingw32\bin\gcc.exe -sha
red -s build\temp.win-amd64-2.7\Release\openslide\_convert.o build\temp.win-amd6
4-2.7\Release\openslide\_convert.def -LD:\WinPython\python-2.7.9.amd64\libs -LD:
\WinPython\python-2.7.9.amd64\PCbuild\amd64 -lpython27 -lmsvcr90 -o build\lib.wi
n-amd64-2.7\openslide\_convert.pyd                                              
    D:/WinPython/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../
../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-mingw_helpers.o
):mingw_helpers.c:(.text+0x0): multiple definition of `_decode_pointer'         
    D:\WinPython\python-2.7.9.amd64\libs/libmsvcr90.a(dacws00231.o):(.text+0x0):
 first defined here                                                             
    D:/WinPython/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../
../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-mingw_helpers.o
):mingw_helpers.c:(.text+0x10): multiple definition of `_encode_pointer'        
    D:\WinPython\python-2.7.9.amd64\libs/libmsvcr90.a(dacws00241.o):(.text+0x0):
 first defined here                                                             
    D:\WinPython\python-2.7.9.amd64\libs/libmsvcr90.a(dacws00288.o):(.text+0x0):
 multiple definition of `_fpreset'                                              
    D:/WinPython/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../
../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-CRT_fp8.o):CRT_
fp8.c:(.text+0x0): first defined here                                           
    D:/WinPython/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../
../x86_64-w64-mingw32/bin/ld.exe: D:/WinPython/tools/mingw32/bin/../lib/gcc/x86_
64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib6
4_libmingw32_a-mingw_helpers.o): bad reloc address 0x0 in section `.pdata'      
    collect2.exe: error: ld returned 1 exit status                              
    error: command 'D:\\WinPython\\scripts\\..\\python-2.7.9.amd64\\..\\tools\\m
ingw32\\bin\\gcc.exe' failed with exit status 1                                 

    ----------------------------------------                                    
    Command "D:\WinPython\python-2.7.9.amd64\python.exe -c "import setuptools, t
okenize;__file__='c:\\users\\nash\\appdata\\local\\temp\\pip-build-89mzyi\\opens
lide-python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).re
ad().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\nash\a
ppdata\local\temp\pip-i496c8-record\install-record.txt --single-version-external
ly-managed --compile" failed with error code 1 in c:\users\nash\appdata\local\te
mp\pip-build-89mzyi\openslide-python                                            

This cannot be correct since gcc is installed on this machine:

C:\Users\Nash>gcc --version
gcc (x86_64-win32-seh-rev1, Built by MinGW-W64 project) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Any ideas what is going on?

@bgilbert
Copy link
Member

It's a compiler toolchain problem of some sort. Python on Windows is compiled with Microsoft's compiler, and while distutils contains various hacks to permit building extension modules with MinGW, they aren't perfect. A Google search found some other people getting the same errors with other extension modules, but I didn't immediately find a reliable-looking solution to your problem. You may have better luck.

If you can't get the build working, you could install OpenSlide Python with python setup.py install --without-performance to skip the extension module.

@nashv
Copy link
Author

nashv commented Apr 30, 2015

Thank you for your comments Benjamin. It is very unfortunate. I suppose that is the reason Christopher Gohlke supplies pre-compiled package installers for Windows.
Is it possible to do the same with Openslide-Python?

Microsoft's compiler is also present on the system, but for reasons unknown distutils is choosing to use MingGW.
Incidently, openslide-python installed without errors on the same machine in Python 3. So I can use it. But now I am unsure if openslide-python on Python 3 did the performance improvements or not.

@bgilbert
Copy link
Member

bgilbert commented May 1, 2015

You can configure distutils to use a particular compiler. If import openslide._convert works for you on Python 3, the performance improvements are available.

Given the difficulty of building extension modules on Windows, perhaps we should indeed provide binary packages. I will investigate whether that is practical.

@bgilbert
Copy link
Member

bgilbert commented Jun 2, 2015

I now have an AppVeyor project to build Python wheels for Windows, so we'll be providing those from now on. I've uploaded wheels for OpenSlide Python 1.1.0 to GitHub and PyPI. pip install should automatically pick them up. Thanks for the report.

@Vozf
Copy link

Vozf commented May 10, 2018

Have the same error when trying to install another repo as a dependency with setup.py which contains openslide-python in install_requires

@bgilbert
Copy link
Member

@Vozf Are you installing using pip? What platform and what version of Python do you have?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants