我正在尝试设置耐用型规则,但命令'pip install耐用型规则'失败。我已按照https://github.com/jruizgit/rules/blob/master/docs/py/reference.md
上的指南进行操作我正在使用Windows 10,Python 3.7.3和PyCharm
我尝试安装Visual Studio构建工具
Running setup.py install for durable-rules ... error
ERROR: Complete output from command 'c:\users\erdemonur\appdata\local\programs\python\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\ERDEMO~1\\AppData\\Local\\Temp\\pip-install-3ds9j796\\durable-rules\\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\ERDEMO~1\AppData\Local\Temp\pip-record-zh_49nld\install-record.txt' --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\durable
copying libpy\durable\engine.py -> build\lib.win-amd64-3.7\durable
copying libpy\durable\interface.py -> build\lib.win-amd64-3.7\durable
copying libpy\durable\lang.py -> build\lib.win-amd64-3.7\durable
copying libpy\durable\__init__.py -> build\lib.win-amd64-3.7\durable
running build_clib
building 'rules_py' library
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\deps
creating build\temp.win-amd64-3.7\deps\Win32_Interop
creating build\temp.win-amd64-3.7\deps\hiredis_win
creating build\temp.win-amd64-3.7\src
creating build\temp.win-amd64-3.7\src\rules
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcdeps/Win32_Interop/win32_error.c /Fobuild\temp.win-amd64-3.7\deps/Win32_Interop/win32_error.obj
win32_error.c
deps/Win32_Interop/win32_error.c(154): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
deps/Win32_Interop/win32_error.c(149): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\string.h(182): note: see declaration of 'strerror'
deps/Win32_Interop/win32_error.c(175): warning C4996: 'strerror': This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\string.h(182): note: see declaration of 'strerror'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcdeps/Win32_Interop/win32_ansi.c /Fobuild\temp.win-amd64-3.7\deps/Win32_Interop/win32_ansi.obj
win32_ansi.c
deps/Win32_Interop/win32_ansi.c(269): warning C4133: 'function': incompatible types - from 'unsigned short [12]' to 'LPCSTR'
deps/Win32_Interop/win32_ansi.c(270): warning C4133: 'function': incompatible types - from 'TCHAR [4]' to 'const wchar_t *'
deps/Win32_Interop/win32_ansi.c(594): warning C4133: 'function': incompatible types - from 'unsigned short [5]' to 'LPTSTR'
deps/Win32_Interop/win32_ansi.c(600): warning C4047: 'function': 'const size_t' differs in levels of indirection from 'unsigned short [9]'
deps/Win32_Interop/win32_ansi.c(600): warning C4024: 'sprintf_s': different types for formal and actual parameter 2
deps/Win32_Interop/win32_ansi.c(600): warning C4047: 'function': 'const char *const ' differs in levels of indirection from 'int'
deps/Win32_Interop/win32_ansi.c(600): warning C4024: 'sprintf_s': different types for formal and actual parameter 3
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tpdeps/Win32_Interop/win32_fdapi.cpp /Fobuild\temp.win-amd64-3.7\deps/Win32_Interop/win32_fdapi.obj
win32_fdapi.cpp
deps/Win32_Interop/win32_fdapi.cpp(118): error C2039: 'system_error': is not a member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\include\string(19): note: see declaration of 'std'
deps/Win32_Interop/win32_fdapi.cpp(118): error C3861: 'system_category': identifier not found
deps/Win32_Interop/win32_fdapi.cpp(118): error C3861: 'system_error': identifier not found
deps/Win32_Interop/win32_fdapi.cpp(1087): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\string.h(338): note: see declaration of 'strncpy'
deps/Win32_Interop/win32_fdapi.cpp(1109): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h(1774): note: see declaration of 'sprintf'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.20.27508\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command "'c:\users\erdemonur\appdata\local\programs\python\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\ERDEMO~1\\AppData\\Local\\Temp\\pip-install-3ds9j796\\durable-rules\\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\ERDEMO~1\AppData\Local\Temp\pip-record-zh_49nld\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ERDEMO~1\AppData\Local\Temp\pip-install-3ds9j796\durable-rules\