Skip to content

Doesn't compile on Windows #2

@rijnb

Description

@rijnb

When I try installing:
C:\Python27>python -m pip install mapcode --target C:\Users\neels\Documents\FME\Plugins\Python
Collecting mapcode
  Downloading mapcode-2.0.1.1.tar.gz (303kB)
    100% |################################| 307kB 364kB/s
Building wheels for collected packages: mapcode
  Running setup.py bdist_wheel for mapcode ... error
  Complete output from command C:\Python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\neels\appdata\local\temp\pip-build-rayf8a\mapcode\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d c:\users\neels\appdata\local\temp\tmp9o982opip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_ext
  building 'mapcode' extension
  creating build
  creating build\temp.win32-2.7
  creating build\temp.win32-2.7\Release
  creating build\temp.win32-2.7\Release\mapcodelib
  C:\Users\neels\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Imapcodelib -IC:\Python27\include -IC:\Python27\PC /Tcmapcodemodule.c /Fobuild\temp.win32-2.7\Release\mapcodemodule.obj
 mapcodemodule.c
  mapcodemodule.c(74) : error C2065: 'NAN' : undeclared identifier
  mapcodemodule.c(75) : error C2065: 'NAN' : undeclared identifier
  mapcodemodule.c(83) : error C2065: 'NAN' : undeclared identifier
  mapcodemodule.c(84) : error C2065: 'NAN' : undeclared identifier
  mapcodemodule.c(120) : error C2143: syntax error : missing ';' before 'type'
  mapcodemodule.c(121) : error C2143: syntax error : missing ';' before 'type'
  mapcodemodule.c(122) : error C2065: 'n' : undeclared identifier
  mapcodemodule.c(123) : error C2065: 'n' : undeclared identifier
  mapcodemodule.c(124) : error C2065: 'n' : undeclared identifier
  mapcodemodule.c(126) : error C2065: 'n' : undeclared identifier
  mapcodemodule.c(127) : error C2065: 'mapcode_results' : undeclared identifier
  mapcodemodule.c(127) : error C2065: 'n' : undeclared identifier
  mapcodemodule.c(127) : error C2109: subscript requires array or pointer type
  mapcodemodule.c(127) : error C2065: 'mapcode_results' : undeclared identifier
  mapcodemodule.c(127) : error C2065: 'n' : undeclared identifier
  mapcodemodule.c(127) : error C2109: subscript requires array or pointer type
  error: command 'C:\Users\neels\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2
 
  ----------------------------------------
  Failed building wheel for mapcode
  Running setup.py clean for mapcode
Failed to build mapcode
Installing collected packages: mapcode
  Running setup.py install for mapcode ... error
    Complete output from command C:\Python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\neels\appdata\local\temp\pip-build-rayf8a\mapcode\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record c:\users\neels\appdata\local\temp\pip-bm_vlm-record\install-record.txt --single-version-externally-managed --compile --home=c:\users\neels\appdata\local\temp\tmpo9lpsz:
    running install
    running build
    running build_ext
    building 'mapcode' extension
    creating build
    creating build\temp.win32-2.7
    creating build\temp.win32-2.7\Release
    creating build\temp.win32-2.7\Release\mapcodelib
    C:\Users\neels\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Imapcodelib -IC:\Python27\include -IC:\Python27\PC /Tcmapcodemodule.c /Fobuild\temp.win32-2.7\Release\mapcodemodule.obj
    mapcodemodule.c
    mapcodemodule.c(74) : error C2065: 'NAN' : undeclared identifier
    mapcodemodule.c(75) : error C2065: 'NAN' : undeclared identifier
    mapcodemodule.c(83) : error C2065: 'NAN' : undeclared identifier
    mapcodemodule.c(84) : error C2065: 'NAN' : undeclared identifier
    mapcodemodule.c(120) : error C2143: syntax error : missing ';' before 'type'
    mapcodemodule.c(121) : error C2143: syntax error : missing ';' before 'type'
    mapcodemodule.c(122) : error C2065: 'n' : undeclared identifier
    mapcodemodule.c(123) : error C2065: 'n' : undeclared identifier
    mapcodemodule.c(124) : error C2065: 'n' : undeclared identifier
    mapcodemodule.c(126) : error C2065: 'n' : undeclared identifier
    mapcodemodule.c(127) : error C2065: 'mapcode_results' : undeclared identifier
    mapcodemodule.c(127) : error C2065: 'n' : undeclared identifier
    mapcodemodule.c(127) : error C2109: subscript requires array or pointer type
    mapcodemodule.c(127) : error C2065: 'mapcode_results' : undeclared identifier
    mapcodemodule.c(127) : error C2065: 'n' : undeclared identifier
    mapcodemodule.c(127) : error C2109: subscript requires array or pointer type
    error: command 'C:\Users\neels\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2
 
    ----------------------------------------
Command "C:\Python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\neels\appdata\local\temp\pip-build-rayf8a\mapcode\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record c:\users\neels\appdata\local\temp\pip-bm_vlm-record\install-record.txt --single-version-externally-managed --compile --home=c:\users\neels\appdata\local\temp\tmpo9lpsz" failed with error code 1 in c:\users\neels\appdata\local\temp\pip-build-rayf8a\mapcode
 
I also struggle to compile due to absence of a wheels module for the package:
C:\Python27\mapcode-python>c:\Python27\python.exe setup.py build_ext --inplace
running build_ext
building 'mapcode' extension
error: Unable to find vcvarsall.bat
 
Any help would be appreciated.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions