Apache Superset Windows 10 安装失败。在虚拟环境中使用 Anaconda Python 3.6 运行时

Apache Superset Windows 10 安装失败。在虚拟环境中使用 Anaconda Python 3.6 运行时

我正在尝试在 Windows 10 上使用 Anaconda Python 3.6 在目录 c:\superset\demo 中名为“demo”的虚拟环境中安装 Apache Superset。这个企业框架有如此多的依赖项,以至于它能够正常工作真是令人惊讶。

python-geohash 构建失败。Superset 包构建失败。

所有其他包都成功构建。我不知道如何修复这些错误。

我尝试过单独安装 geohash,但失败了。我会继续尝试,看看是否有解决方法。

这是安装日志。

(demo) (base) c:\superset\demo\Scripts>pip install python-geohash
Collecting python-geohash
Using cached https://files.pythonhosted.org/packages/9c/e2/1a3507af7c8f91f8a4975d651d4aeb6a846dfdf74713954186ade4205850/python-geohash-0.8.5.tar.gz
Building wheels for collected packages: python-geohash
Building wheel for python-geohash (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\superset\demo\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\username\AppData\Local\Temp\pip-install-2_q8h1nq\python-geohash\setup.py'"'"'; file='"'"'C:\Users\username\AppData\Local\Temp\pip-install-2_q8h1nq\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\username\AppData\Local\Temp\pip-wheel-8f2vkeqi' --python-tag cp37
cwd: C:\Users\username\AppData\Local\Temp\pip-install-2_q8h1nq\python-geohash
Complete output (22 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying geohash.py -> build\lib.win-amd64-3.7
copying quadtree.py -> build\lib.win-amd64-3.7
copying jpgrid.py -> build\lib.win-amd64-3.7
copying jpiarea.py -> build\lib.win-amd64-3.7
running build_ext
building '_geohash' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MODULE=1 -Ic:\programdata\anaconda3\include -Ic:\programdata\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /EHsc /Tpsrc/geohash.cpp /Fobuild\temp.win-amd64-3.7\Release\src/geohash.obj
geohash.cpp
src/geohash.cpp(383): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data
src/geohash.cpp(428): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data
src/geohash.cpp(429): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data
src/geohash.cpp(528): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
c:\programdata\anaconda3\include\pyconfig.h(215): 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 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:\superset\demo\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\lysak\AppData\Local\Temp\pip-install-2_q8h1nq\python-geohash\setup.py'"'"'; file='"'"'C:\Users\lysak\AppData\Local\Temp\pip-install-2_q8h1nq\python-geohash\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\lysak\AppData\Local\Temp\pip-record-i3ibyuj2\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\superset\demo\include\site\python3.7\python-geohash'
cwd: C:\Users\lysak\AppData\Local\Temp\pip-install-2_q8h1nq\python-geohash
Complete output (22 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying geohash.py -> build\lib.win-amd64-3.7
copying quadtree.py -> build\lib.win-amd64-3.7
copying jpgrid.py -> build\lib.win-amd64-3.7
copying jpiarea.py -> build\lib.win-amd64-3.7
running build_ext
building '_geohash' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MODULE=1 -Ic:\programdata\anaconda3\include -Ic:\programdata\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /EHsc /Tpsrc/geohash.cpp /Fobuild\temp.win-amd64-3.7\Release\src/geohash.obj
geohash.cpp
src/geohash.cpp(383): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data
src/geohash.cpp(428): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data
src/geohash.cpp(429): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data
src/geohash.cpp(528): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
c:\programdata\anaconda3\include\pyconfig.h(215): 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: Command errored out with exit status 1: 'c:\superset\demo\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\lysak\AppData\Local\Temp\pip-install-2_q8h1nq\python-geohash\setup.py'"'"'; file='"'"'C:\Users\lysak\AppData\Local\Temp\pip-install-2_q8h1nq\python-geohash\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\lysak\AppData\Local\Temp\pip-record-i3ibyuj2\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\superset\demo\include\site\python3.7\python-geohash' Check the logs for full command output.

(demo) (base) c:\superset\demo\Scripts>

答案1

你安装了 python-geohash wheel 吗?你必须安装与你的 python 版本兼容的 wheel,还必须安装 Microsoft C++ build tool 2015

链接至 python-geohash wheel =>https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-geohash

相关内容