cesium-ml / cesium

Machine Learning Time-Series Platform
Other
670 stars 101 forks source link

Failing to pip install cesium #214

Closed pkgandhi closed 7 years ago

pkgandhi commented 7 years ago

Hello,

I am not able to install the cesium package through pip install even though all the dependencies are satisfied. I am getting something like following. Does anyone know what is going on here:

image

Thanks!

stefanv commented 7 years ago

Thanks for the bug report, @pkgandhi. Which commands did you run to generate the above?

If you haven't yet, please also try:

pip install --upgrade pip
pip install .
pkgandhi commented 7 years ago

@stefanv : Pip says it is up to date! Doing "pip install ." it says File setup.py not found. It is kind of bizarre, ain't it?

stefanv commented 7 years ago

Did you run pip install . in the Cesium source directory?

pkgandhi commented 7 years ago

Somehow I am not able to locate Cesium source directory. It is trying to collect from cache, but I am unable to locate it. Any ideas how to find it?

pkgandhi commented 7 years ago

@stefanv I tried downloading source and doing pip install . - still did not work. Getting the following error:

image

bnaul commented 7 years ago

Hi @pkgandhi, we don't officially support Windows so I'm not surprised that this isn't working. However, I'm willing to try and sort it out if you can provide us a little more information; there shouldn't be anything in the library that can't be made to work with a proper Windows development environment.

Can you try copy-pasting the entire output here (it would be better to provide the whole text in a ``` block instead of a screenshot)? The line you're giving us basically just says that an error occurred, but we need the rest of the traceback in order to see what in particular went wrong.

pkgandhi commented 7 years ago

Hi @bnaul, sure! Attached is the screenshot:

image

image

image

Attached are the screenshots. Let me know if these would help!

Thanks!

bnaul commented 7 years ago

Great, thanks for the expanded output. That error appears because you don't have a C compiler installed: our package has some features which are implemented in C and integrated into our Python code via cython. Here is a link that describes how to install a C compiler for Windows: https://github.com/cython/cython/wiki/CythonExtensionsOnWindows. I believe once you have a C compiler the package should compile and load correctly, but again, we haven't explicitly tested this on Windows.

I'm going to close this for now since this isn't a bug in cesium per se, but feel free to keep commenting here. I personally would strongly recommend that you set up a Linux-like environment for your development, e.g. using Docker: https://docs.docker.com/engine/installation/windows/. But that's just my personal preference :).

beeb commented 6 years ago

Hey! Sorry to bring back this issue from the dead, coming back to this to say that I was unable to install cesium using pip on Windows 10. I have Anaconda and made a separate Python 3.6 environment for this, installed all the dependencies succesfully. I installed the Visual Studio Build Tools 2017 so I have a compiler available.

Unfortunately, the compilation fails, here is what pip gives me.

So the first error is this:

error: Command "C:\Program Files (x86)\Microsoft Visual 
Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\me\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\numpy\core\include -IC:\Users\me\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\numpy\core\include -IC:\Users\me\AppData\Local\conda\conda\envs\tensorflow\include -IC:\Users\me\AppData\Local\conda\conda\envs\tensorflow\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tccesium\features\_lomb_scargle.c /Fobuild\temp.win-amd64-3.6\Release\cesium\features\_lomb_scargle.obj" failed with exit status 2
Failed building wheel for cesium

Then this:

 error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\me\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\numpy\core\include -IC:\Users\me\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\numpy\core\include -IC:\Users\me\AppData\Local\conda\conda\envs\tensorflow\include -IC:\Users\me\AppData\Local\conda\conda\envs\tensorflow\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tccesium\features\_lomb_scargle.c /Fobuild\temp.win-amd64-3.6\Release\cesium\features\_lomb_scargle.obj" failed with exit status 2

    ----------------------------------------
Command "C:\Users\me\AppData\Local\conda\conda\envs\tensorflow\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\me\\AppData\\Local\\Temp\\pip-install-rrr09t5v\\cesium\\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\me\AppData\Local\Temp\pip-record-lmdbgvey\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\me\AppData\Local\Temp\pip-install-rrr09t5v\cesium\

Installing from source gave pretty much the same result.

I have no clue which other compiler to use for this, they seem to all not support Python > 3.4. Any help would be greatly appreciated! Thanks

goldentom42 commented 5 years ago

Hi there, same here on windows 8.1 with the same compiler.

I'm usually able to build packages either from windows comand window or from a git bash.

Both give the exact same compiler error

image

Thanks for your help, Olivier

acrellin commented 5 years ago

Hi @beeb and @goldentom42, MinGW works for Python 3.6. Please try that and let us know if that solves your installation issues.

prathamsolanki commented 5 years ago

I'm also encountering the same issue as @beeb on Windows 10. I too have a similar Python 3.6 Anaconda environment. @beeb have you tried @acrellin 's solution with MinGW? Has it worked? so I may do the same as well.

beeb commented 5 years ago

Please see this how-to. I'm trying it right now EDIT: It works!

prathamsolanki commented 5 years ago

Yeah worked for me as well!