apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
63.04k stars 13.96k forks source link

Windows 10 installation still fails #7982

Closed richlysakowski closed 5 years ago

richlysakowski commented 5 years ago

Please don't tell me that "Superset is not supported on Windows" !! This is a Python toolset and is supposed to be cross-platform.
"Not supported on Windows" is an unacceptable cop-out. (Yes, I do appreciate all the great work the community is doing, I just don't like using Unix for Python work.

When I follow the instructions, I get the same failure errors when it goes to build the Superset and Geohash packages. All the other packages build successfully. I've already installed the Visual C++ v14 compiler runtime inside Visual Studio 2019, by selecting the VC++ 14 workload.

How do we correctly build these 2 packages Superset and Geohash so the rest of the Superset installation works? Can these be built separately after all the other packages are built successfully?

I get three major errors,

1) "fatal: not a git repository (or any of the parent directories): .git" 2) "copying build\lib\superset\static\assets\dist\vendors-deckgl\layers\arc-deckgl\layers\geojson-deckgl\layers\grid-deckgl\layers\hex-deckgl\layers\p-39b91eb9.81565bc93ff56be4e334.chunk.js -> build\bdist.win-amd64\wheel.\superset\static\assets\dist\vendors-deckgl\layers\arc-deckgl\layers\geojson-deckgl\layers\grid-deckgl\layers\hex-deckgl\layers error: could not create 'build\bdist.win-amd64\wheel.\superset\static\assets\dist\vendors-deckgl\layers\arc-deckgl\layers\geojson-deckgl\layers\grid-deckgl\layers\hex-deckgl\layers\p-39b91eb9.81565bc93ff56be4e334.chunk.js': No such file or directory

3) src/geohash.cpp(528): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data c:\programdata\anaconda3\envs\superset\include\pyconfig.h(222): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

ERROR: Failed building wheel for python-geohash Running setup.py clean for python-geohash Failed to build superset python-geohash Installing collected packages: python-geohash, simplejson, sqlparse, rfc3986, unicodecsv, xlrd, jsonlines, linear-tsv, et-xmlfile, jdcal, openpyxl, cchardet, ijson, tabulator, tableschema, thrift, pure-sasl, thrift-sasl, unidecode, superset Running setup.py install for python-geohash ... error ERROR: Command errored out with exit status 1: command: 'C:\ProgramData\Anaconda3\envs\superset\python.exe'

Building wheels for collected packages: superset, python-geohash
  Building wheel for superset (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\ProgramData\Anaconda3\envs\superset\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lysak\\AppData\\Local\\Temp\\pip-install-aayicj11\\superset\\setup.py'"'"'; __file__='"'"'C:\\Users\\lysak\\AppData\\Local\\Temp\\pip-install-aayicj11\\superset\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\lysak\AppData\Local\Temp\pip-wheel-gs1bvxrp' --python-tag cp36
       cwd: C:\Users\lysak\AppData\Local\Temp\pip-install-aayicj11\superset\
  Complete output (2687 lines):
  fatal: not a git repository (or any of the parent directories): .git
  -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
  VERSION: 0.28.1
  GIT SHA:
  copying build\lib\superset\static\assets\dist\vendors-deckgl\layers\arc-deckgl\layers\geojson-deckgl\layers\grid-deckgl\layers\hex-deckgl\layers\p-39b91eb9.81565bc93ff56be4e334.chunk.js -> build\bdist.win-amd64\wheel\.\superset\static\assets\dist\vendors-deckgl\layers\arc-deckgl\layers\geojson-deckgl\layers\grid-deckgl\layers\hex-deckgl\layers
  error: could not create 'build\bdist.win-amd64\wheel\.\superset\static\assets\dist\vendors-deckgl\layers\arc-deckgl\layers\geojson-deckgl\layers\grid-deckgl\layers\hex-deckgl\layers\p-39b91eb9.81565bc93ff56be4e334.chunk.js': No such file or directory
  ----------------------------------------
  ERROR: Failed building wheel for superset
  Running setup.py clean for superset
  Building wheel for python-geohash (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\ProgramData\Anaconda3\envs\superset\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lysak\\AppData\\Local\\Temp\\pip-install-aayicj11\\python-geohash\\setup.py'"'"'; __file__='"'"'C:\\Users\\lysak\\AppData\\Local\\Temp\\pip-install-aayicj11\\python-geohash\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\lysak\AppData\Local\Temp\pip-wheel-pvih8dfx' --python-tag cp36
       cwd: C:\Users\lysak\AppData\Local\Temp\pip-install-aayicj11\python-geohash\
  Complete output (22 lines):
issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.67. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

richlysakowski commented 5 years ago

Here is the full log installation file (attached). Please fix these modules. There are millions more Windows computers out there than Linux or Macintosh OSX. This great open source product will get more airplay if you get the installation working correctly on Windows.

2019-08-03-v3-installation-error-log.txt

richlysakowski commented 5 years ago

Perhaps these leads can help someone identify a way to fix these two package build errors.

One potential issues I found is that the Python-geohash kit is 10 years old, with no maintenance for Geohash for the past 5 years. 5 years ago the following setup.py file has 1 change and geohash.py has "minor enhancement", but at that time the code was still hosted in a Google Code repo.

Hiroaki.Kawai@gmail.com minor enhancement f5d105f on Aug 13, 2014 19 lines (16 sloc) 525 Bytes

try: from setuptools import setup, Extension except ImportError: from distutils.core import setup, Extension

requiring C++ here for Windows support.

c1=Extension('_geohash', sources=['src/geohash.cpp',], define_macros = [('PYTHON_MODULE',1),])

setup(name='python-geohash', version='0.8.5', description='Fast, accurate python geohashing library', author='Hiroaki Kawai', url='http://code.google.com/p/python-geohash/', py_modules=['geohash','quadtree','jpgrid','jpiarea'], ext_modules = [c1] )

PowerPlop commented 5 years ago

Manually installing the .whl file from https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-geohash with pip install python_geohash‑0.8.5‑cp37‑cp37m‑win_amd64.whl (or other version) fixed this for me.

mistercrunch commented 5 years ago

win_nt_blue_screen_of_death

If someone wants to take on Windows support the work will be welcomed. I don't think any of the current committers have the intention of putting much work in that direction though.

In the meantime maybe Docker on Windows? Does that work? Does Travis offer Windows builds? It's not all to get it to work on windows, it should be part of the build matrix if you want to prevent regressions.

mistercrunch commented 5 years ago

Main problem is probably that we depend on libs that are not fully Windows-compatible or features like signals (our timeout context generator). Things like symlinks seem to be problematic too...

mark05e commented 5 years ago

I was able to get the installation running on a fresh windows machine (did not have any python instances installed before). There were few packages I had to upgrade/downgrade manually after main installation. You can check out my notes here - https://gist.github.com/mark05e/d9cccae129dd11a21d7219eddd7d9923

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

mukhwami commented 4 years ago

Manually installing the .whl file from https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-geohash with pip install python_geohash‑0.8.5‑cp37‑cp37m‑win_amd64.whl (or other version) fixed this for me.

This worked for me too on windows 10.

hasanshan commented 2 years ago

Get following error : error C1083: Cannot open include file: 'stdio.h': No such file or directory

ERROR: Command errored out with exit status 1: command: 'c:\users\901418\appdata\local\programs\python\python39\myenv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\901418\AppData\Local\Temp\pip-req-build-tpz4ba73\setup.py'"'"'; file='"'"'C:\Users\901418\AppData\Local\Temp\pip-req-build-tpz4ba73\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\901418\AppData\Local\Temp\pip-wheel-6x6_3cze' cwd: C:\Users\901418\AppData\Local\Temp\pip-req-build-tpz4ba73\ Complete output (18 lines): running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.9 copying geohash.py -> build\lib.win-amd64-3.9 copying quadtree.py -> build\lib.win-amd64-3.9 copying jpgrid.py -> build\lib.win-amd64-3.9 copying jpiarea.py -> build\lib.win-amd64-3.9 running build_ext building '_geohash' extension creating build\temp.win-amd64-3.9 creating build\temp.win-amd64-3.9\Release creating build\temp.win-amd64-3.9\Release\src D:\Programs\MSVisualStudio2022\VC\Tools\MSVC\14.30.30705\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MODULE=1 -Ic:\users\901418\appdata\local\programs\python\python39\myenv\include -IC:\Users\901418\AppData\Local\Programs\Python\Python39\include -IC:\Users\901418\AppData\Local\Programs\Python\Python39\include -ID:\Programs\MSVisualStudio2022\VC\Tools\MSVC\14.30.30705\ATLMFC\include -ID:\Programs\MSVisualStudio2022\VC\Tools\MSVC\14.30.30705\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um /EHsc /Tpsrc/geohash.cpp /Fobuild\temp.win-amd64-3.9\Release\src/geohash.obj geohash.cpp src/geohash.cpp(2): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory error: command 'D:\Programs\MSVisualStudio2022\VC\Tools\MSVC\14.30.30705\bin\HostX86\x64\cl.exe' failed with exit code 2

ERROR: Failed building wheel for python-geohash Running setup.py clean for python-geohash Failed to build python-geohash Installing collected packages: python-geohash Running setup.py install for python-geohash ... error ERROR: Command errored out with exit status 1: command: 'c:\users\901418\appdata\local\programs\python\python39\myenv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\901418\AppData\Local\Temp\pip-req-build-tpz4ba73\setup.py'"'"'; file='"'"'C:\Users\901418\AppData\Local\Temp\pip-req-build-tpz4ba73\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\901418\AppData\Local\Temp\pip-record-rwlqhw7h\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\901418\appdata\local\programs\python\python39\myenv\include\site\python3.9\python-geohash' cwd: C:\Users\901418\AppData\Local\Temp\pip-req-build-tpz4ba73\ Complete output (18 lines): running install running build running build_py creating build creating build\lib.win-amd64-3.9 copying geohash.py -> build\lib.win-amd64-3.9 copying quadtree.py -> build\lib.win-amd64-3.9 copying jpgrid.py -> build\lib.win-amd64-3.9 copying jpiarea.py -> build\lib.win-amd64-3.9 running build_ext building '_geohash' extension creating build\temp.win-amd64-3.9 creating build\temp.win-amd64-3.9\Release creating build\temp.win-amd64-3.9\Release\src D:\Programs\MSVisualStudio2022\VC\Tools\MSVC\14.30.30705\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MODULE=1 -Ic:\users\901418\appdata\local\programs\python\python39\myenv\include -IC:\Users\901418\AppData\Local\Programs\Python\Python39\include -IC:\Users\901418\AppData\Local\Programs\Python\Python39\include -ID:\Programs\MSVisualStudio2022\VC\Tools\MSVC\14.30.30705\ATLMFC\include -ID:\Programs\MSVisualStudio2022\VC\Tools\MSVC\14.30.30705\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um /EHsc /Tpsrc/geohash.cpp /Fobuild\temp.win-amd64-3.9\Release\src/geohash.obj geohash.cpp src/geohash.cpp(2): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory error: command 'D:\Programs\MSVisualStudio2022\VC\Tools\MSVC\14.30.30705\bin\HostX86\x64\cl.exe' failed with exit code 2

ERROR: Command errored out with exit status 1: 'c:\users\901418\appdata\local\programs\python\python39\myenv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\901418\AppData\Local\Temp\pip-req-build-tpz4ba73\setup.py'"'"'; file='"'"'C:\Users\901418\AppData\Local\Temp\pip-req-build-tpz4ba73\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\901418\AppData\Local\Temp\pip-record-rwlqhw7h\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\901418\appdata\local\programs\python\python39\myenv\include\site\python3.9\python-geohash' Check the logs for full command output.

Please update:

ruchaka commented 1 year ago

Getting Error while installing Geohash : 'stdio.h': No such file or directory

Error as below------------------------ Installing collected packages: python-geohash, pymeeus, korean-lunar-calendar, convertdate, backoff, holidays, flask-caching, apache-superset Running setup.py install for python-geohash ... error error: subprocess-exited-with-error × Running setup.py install for python-geohash did not run successfully. │ exit code: 1 ╰─> [20 lines of output] running install c:\apache_superset\venv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-38 copying geohash.py -> build\lib.win-amd64-cpython-38 copying quadtree.py -> build\lib.win-amd64-cpython-38 copying jpgrid.py -> build\lib.win-amd64-cpython-38 copying jpiarea.py -> build\lib.win-amd64-cpython-38 running build_ext building '_geohash' extension creating build\temp.win-amd64-cpython-38 creating build\temp.win-amd64-cpython-38\Release creating build\temp.win-amd64-cpython-38\Release\src "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DPYTHON_MODULE=1 -Ic:\apache_superset\venv\include -IC:\Python38\include -IC:\Python38\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /EHsc /Tpsrc/geohash.cpp /Fobuild\temp.win-amd64-cpython-38\Release\src/geohash.obj geohash.cpp src/geohash.cpp(2): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> python-geohash note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

Manually installation of the wheel is not working for Windows 10 64-bit. Please suggest the solution for this.