pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.05k stars 289 forks source link

I'm getting this error when i fire pip install satpy #1337

Open rishikesh019 opened 4 years ago

rishikesh019 commented 4 years ago

Running setup.py install for pykdtree ... error ERROR: Command errored out with exit status 1: command: 'c:\program files (x86)\microsoft visual studio\shared\python37_64\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\hp\AppData\Local\Temp\pip-install-th7x3p6v\pykdtree\setup.py'"'"'; file='"'"'C:\Users\hp\AppData\Local\Temp\pip-install-th7x3p6v\pykdtree\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\hp\AppData\Local\Temp\pip-record-qlbdd0np\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\hp\AppData\Roaming\Python\Python37\Include\pykdtree' cwd: C:\Users\hp\AppData\Local\Temp\pip-install-th7x3p6v\pykdtree\ Complete output (11 lines): running install running build running build_py creating build creating build\lib.win-amd64-3.7 creating build\lib.win-amd64-3.7\pykdtree copying pykdtree\test_tree.py -> build\lib.win-amd64-3.7\pykdtree copying pykdtree__init__.py -> build\lib.win-amd64-3.7\pykdtree running build_ext building 'pykdtree.kdtree' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

ERROR: Command errored out with exit status 1: 'c:\program files (x86)\microsoft visual studio\shared\python37_64\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\hp\AppData\Local\Temp\pip-install-th7x3p6v\pykdtree\setup.py'"'"'; file='"'"'C:\Users\hp\AppData\Local\Temp\pip-install-th7x3p6v\pykdtree\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\hp\AppData\Local\Temp\pip-record-qlbdd0np\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\hp\AppData\Roaming\Python\Python37\Include\pykdtree' Check the logs for full command output. satpyerror

Environment Info:

mraspaud commented 4 years ago

@ItzRishikesh Thanks you for reporting this issue!

As the error message indicates, this is an error when trying to compile pykdtree (https://github.com/storpipfugl/pykdtree), so I would recommend trying to install pykdtree alone with pip first to see if you get the same error.

Another thing you can see in the error message, is that you need a compiler in order to install pykdtree. Do you have a compiler installed? (they seem to recommend Microsoft Visual C++ Build Tools)

rishikesh019 commented 4 years ago

pykdtree

ERROR: Command errored out with exit status 1:
 command: 'c:\program files (x86)\microsoft visual studio\shared\python37_64\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-rmogn1bx\\pykdtree\\setup.py'"'"'; __file__='"'"'C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-rmogn1bx\\pykdtree\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\hp\AppData\Local\Temp\pip-record-ix2x6k7f\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\hp\AppData\Roaming\Python\Python37\Include\pykdtree'
     cwd: C:\Users\hp\AppData\Local\Temp\pip-install-rmogn1bx\pykdtree\
Complete output (34 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pykdtree
copying pykdtree\test_tree.py -> build\lib.win-amd64-3.7\pykdtree
copying pykdtree\__init__.py -> build\lib.win-amd64-3.7\pykdtree
running build_ext
building 'pykdtree.kdtree' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\pykdtree
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-Ic:\program files (x86)\microsoft visual studio\shared\python37_64\include" "-Ic:\program files (x86)\microsoft visual studio\shared\python37_64\include" -IC:\Users\hp\AppData\Roaming\Python\Python37\site-packages\numpy\core\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" /Tcpykdtree/kdtree.c /Fobuild\temp.win-amd64-3.7\Release\pykdtree/kdtree.obj /Ox /openmp
kdtree.c
c:\users\hp\appdata\roaming\python\python37\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
pykdtree/kdtree.c(2886): warning C4244: '=': conversion from 'npy_intp' to 'long', possible loss of data
pykdtree/kdtree.c(2991): warning C4244: '=': conversion from 'npy_intp' to 'uint32_t', possible loss of data
pykdtree/kdtree.c(3923): warning C4244: 'function': conversion from 'double' to 'float', possible loss of data
pykdtree/kdtree.c(10016): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
pykdtree/kdtree.c(10022): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-Ic:\program files (x86)\microsoft visual studio\shared\python37_64\include" "-Ic:\program files (x86)\microsoft visual studio\shared\python37_64\include" -IC:\Users\hp\AppData\Roaming\Python\Python37\site-packages\numpy\core\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" /Tcpykdtree/_kdtree_core.c /Fobuild\temp.win-amd64-3.7\Release\pykdtree/_kdtree_core.obj /Ox /openmp
_kdtree_core.c
pykdtree/_kdtree_core.c(603): warning C4028: formal parameter 8 different from declaration
pykdtree/_kdtree_core.c(766): warning C4056: overflow in floating-point constant arithmetic
pykdtree/_kdtree_core.c(1247): warning C4028: formal parameter 8 different from declaration
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:c:\program files (x86)\microsoft visual studio\shared\python37_64\libs" "/LIBPATH:c:\program files (x86)\microsoft visual studio\shared\python37_64\PCbuild\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64" /EXPORT:PyInit_kdtree build\temp.win-amd64-3.7\Release\pykdtree/kdtree.obj build\temp.win-amd64-3.7\Release\pykdtree/_kdtree_core.obj /OUT:build\lib.win-amd64-3.7\pykdtree\kdtree.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\pykdtree\kdtree.cp37-win_amd64.lib
kdtree.obj : warning LNK4197: export 'PyInit_kdtree' specified multiple times; using first specification
   Creating library build\temp.win-amd64-3.7\Release\pykdtree\kdtree.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\pykdtree\kdtree.cp37-win_amd64.exp
Generating code
c:\users\hp\appdata\local\temp\pip-install-rmogn1bx\pykdtree\pykdtree\_kdtree_core.c(766) : warning C4756: overflow in constant arithmetic
Finished generating code
LINK : fatal error LNK1158: cannot run 'rc.exe'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1158
----------------------------------------

ERROR: Command errored out with exit status 1: 'c:\program files (x86)\microsoft visual studio\shared\python37_64\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\hp\AppData\Local\Temp\pip-install-rmogn1bx\pykdtree\setup.py'"'"'; file='"'"'C:\Users\hp\AppData\Local\Temp\pip-install-rmogn1bx\pykdtree\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\hp\AppData\Local\Temp\pip-record-ix2x6k7f\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\hp\AppData\Roaming\Python\Python37\Include\pykdtree' Check the logs for full command output.

rishikesh019 commented 4 years ago

Microsoft Visual C++ Build Tools

I install this Microsoft Visual C++ Build Tools

mraspaud commented 4 years ago

Ok, this is an issue with pykdtree then. Can you open an issue there instead and close this one? Thanks!

LuisSevillano commented 4 years ago

Hi @ItzRishikesh I had the same issue. Following @mraspaud advice, I went to the pykdtree repository and installed it. In my case I downloaded the repository and and run python setup.py install. After that, satpy installation worked like a charm. I hope you make it!