[해결됨] 댓글로 답변해주세요!
Python에 이러한 요구 사항(jaydebeapi==1.2.3)을 설치하려고 하는데 아래 문제가 발생합니다.
오류의 주요 메시지는 다음과 같습니다: "포함 파일을 열 수 없습니다: 'basetsd.h': 해당 파일이나 디렉터리가 없습니다."
OBS: 저는 Pycharm, Python 3.8, Windows 10을 사용하고 있습니다.
Running setup.py install for JPype1 ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files (x86)\python 3.8.5\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\nakanov\\AppData\\Local\\Temp\\pip-install-1_cw9km2\\
jpype1_abb3802e6dfd4c54b583d9883ffd5d06\\setup.py'"'"'; __file__='"'"'C:\\Users\\nakanov\\AppData\\Local\\Temp\\pip-install-1_cw9km2\\jpype1_abb3802e6dfd4c54b583d9883ffd5d06\\setup.py'"'"';f = ge
tattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"')
;f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\nakanov\AppData\Local\Temp\pip-record-tt0zqrwa\install-record.txt' --single-version-externally-managed --user
--prefix= --compile --install-headers 'C:\Users\nakanov\AppData\Roaming\Python\Python38\Include\JPype1'
cwd: C:\Users\nakanov\AppData\Local\Temp\pip-install-1_cw9km2\jpype1_abb3802e6dfd4c54b583d9883ffd5d06\
Complete output (59 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\jpype
copying jpype\beans.py -> build\lib.win32-3.8\jpype
copying jpype\config.py -> build\lib.win32-3.8\jpype
copying jpype\dbapi2.py -> build\lib.win32-3.8\jpype
copying jpype\imports.py -> build\lib.win32-3.8\jpype
copying jpype\nio.py -> build\lib.win32-3.8\jpype
copying jpype\pickle.py -> build\lib.win32-3.8\jpype
copying jpype\protocol.py -> build\lib.win32-3.8\jpype
copying jpype\types.py -> build\lib.win32-3.8\jpype
copying jpype\_classpath.py -> build\lib.win32-3.8\jpype
copying jpype\_core.py -> build\lib.win32-3.8\jpype
copying jpype\_gui.py -> build\lib.win32-3.8\jpype
copying jpype\_jarray.py -> build\lib.win32-3.8\jpype
copying jpype\_jclass.py -> build\lib.win32-3.8\jpype
copying jpype\_jcollection.py -> build\lib.win32-3.8\jpype
copying jpype\_jcustomizer.py -> build\lib.win32-3.8\jpype
copying jpype\_jexception.py -> build\lib.win32-3.8\jpype
copying jpype\_jinit.py -> build\lib.win32-3.8\jpype
copying jpype\_jio.py -> build\lib.win32-3.8\jpype
copying jpype\_jmethod.py -> build\lib.win32-3.8\jpype
copying jpype\_jobject.py -> build\lib.win32-3.8\jpype
copying jpype\_jpackage.py -> build\lib.win32-3.8\jpype
copying jpype\_jproxy.py -> build\lib.win32-3.8\jpype
copying jpype\_jstring.py -> build\lib.win32-3.8\jpype
copying jpype\_jthread.py -> build\lib.win32-3.8\jpype
copying jpype\_jvmfinder.py -> build\lib.win32-3.8\jpype
copying jpype\_pykeywords.py -> build\lib.win32-3.8\jpype
copying jpype\__init__.py -> build\lib.win32-3.8\jpype
package init file 'jpype\_pyinstaller\__init__.py' not found (or not a regular file)
creating build\lib.win32-3.8\jpype\_pyinstaller
copying jpype\_pyinstaller\entry_points.py -> build\lib.win32-3.8\jpype\_pyinstaller
copying jpype\_pyinstaller\example.py -> build\lib.win32-3.8\jpype\_pyinstaller
copying jpype\_pyinstaller\hook-jpype.py -> build\lib.win32-3.8\jpype\_pyinstaller
copying jpype\_pyinstaller\test_jpype_pyinstaller.py -> build\lib.win32-3.8\jpype\_pyinstaller
copying jpype\_core.pyi -> build\lib.win32-3.8\jpype
copying jpype\_jcollection.pyi -> build\lib.win32-3.8\jpype
copying jpype\_jio.pyi -> build\lib.win32-3.8\jpype
copying jpype\_jstring.pyi -> build\lib.win32-3.8\jpype
copying jpype\_jthread.pyi -> build\lib.win32-3.8\jpype
running build_ext
Call build extensions
Using Jar cache
copying native\jars\org.jpype.jar -> build\lib.win32-3.8
Call build ext
building '_jpype' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\native
creating build\temp.win32-3.8\Release\native\common
creating build\temp.win32-3.8\Release\native\python
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWIN32=1 -Inative\common\include -Inative\
python\include -Inative\embedded\include -Inative\jni_include "-Ic:\program files (x86)\python 3.8.5\include" "-Ic:\program files (x86)\python 3.8.5\include" "-IC:\Program Files (x86)\Microsoft V
isual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x8
6)\Windows Kits\10\Include\10.0.10240.0\ucrt" /EHsc /Tpnative\common\jp_array.cpp /Fobuild\temp.win32-3.8\Release\native\common\jp_array.obj /Zi /EHsc /std:c++14
jp_array.cpp
c:\program files (x86)\python 3.8.5\include\pyconfig.h(206): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory.
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files (x86)\python 3.8.5\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\nakanov\\AppData\\Lo
cal\\Temp\\pip-install-1_cw9km2\\jpype1_abb3802e6dfd4c54b583d9883ffd5d06\\setup.py'"'"'; __file__='"'"'C:\\Users\\nakanov\\AppData\\Local\\Temp\\pip-install-1_cw9km2\\jpype1_abb3802e6dfd4c54b583d
9883ffd5d06\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().repl
ace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\nakanov\AppData\Local\Temp\pip-record-tt0zqrwa\install-record.txt' --single-v
ersion-externally-managed --user --prefix= --compile --install-headers 'C:\Users\nakanov\AppData\Roaming\Python\Python38\Include\JPype1' Check the logs for full command output.
답변1
어떤 이유로 인해 이 JPype 종속성은 내 컴퓨터와 호환되지 않습니다. Jaydebeapi의 특정 종속성(JPype)으로 인해 오류가 발생했습니다. 다음 명령을 사용하여 JPype 다운그레이드를 수행했습니다.
pip install --force-reinstall JPype1==0.6.3
그런 다음 jaydebeapi를 설치하는 명령을 실행했습니다.
pip install jaydebeapi==1.2.3