Error de pip: no se puede abrir el archivo de inclusión: 'basetsd.h': no ​​existe tal archivo o directorio

Error de pip: no se puede abrir el archivo de inclusión: 'basetsd.h': no ​​existe tal archivo o directorio

[SOLUCIONADO] ¡Respuesta en comentarios!

Estoy intentando instalar estos requisitos (jaydebeapi==1.2.3) en Python y me enfrento al siguiente problema.

El principal mensaje de error es: "No se puede abrir el archivo de inclusión: 'basetsd.h': no ​​existe tal archivo o directorio"

OBS: estoy usando Pycharm, Python 3.8 y 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.

Respuesta1

Por alguna razón aún desconocida, esta dependencia de JPype es incompatible con mi máquina. Esta dependencia específica (JPype) de Jaydebeapi estaba dando el error. Hice una degradación de JPype con el siguiente comando:

pip install --force-reinstall JPype1==0.6.3

Y luego ejecuté el comando para instalar jaydebeapi.

pip install jaydebeapi==1.2.3

información relacionada