简体   繁体   中英

Building wheels for pycare (setup.py) …error

I'm trying to install Twint, and everytime I try to install the package, I get an error involving pycares . I've tried installing pycares by itself, and I get the same error. I do not have Ares installed or c_ares installed. I also do not have homebrew installed.

I've can install other packages with no issue. I've also tried manually installing pycares , and that also does not work.

  ERROR: Command errored out with exit status 1:
   command: 'c:\users\conno\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\conno\\AppData\\Local\\Temp\\pip-install-6ytwlxor\\pycares_2a6644854aad49279cec4174797f3f73\\setup.py'"'"'; __file__='"'"'C:\\Users\\conno\\AppData\\Local\\Temp\\pip-install-6ytwlxor\\pycares_2a6644854aad49279cec4174797f3f73\\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\conno\AppData\Local\Temp\pip-wheel-x54knmfy'
       cwd: C:\Users\conno\AppData\Local\Temp\pip-install-6ytwlxor\pycares_2a6644854aad49279cec4174797f3f73\
  Complete output (26 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\pycares
  copying src\pycares\errno.py -> build\lib.win-amd64-3.9\pycares
  copying src\pycares\utils.py -> build\lib.win-amd64-3.9\pycares
  copying src\pycares\_version.py -> build\lib.win-amd64-3.9\pycares
  copying src\pycares\__init__.py -> build\lib.win-amd64-3.9\pycares
  copying src\pycares\__main__.py -> build\lib.win-amd64-3.9\pycares
  running build_ext
  generating cffi module 'build\\temp.win-amd64-3.9\\Release\\_cares.c'
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  building '_cares' extension
  creating build\temp.win-amd64-3.9\Release\build
  creating build\temp.win-amd64-3.9\Release\build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release\build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\deps
  creating build\temp.win-amd64-3.9\Release\deps\c-ares
  creating build\temp.win-amd64-3.9\Release\deps\c-ares\src
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DCARES_PULL_WS2TCPIP_H=1 -Ic:\users\conno\appdata\local\programs\python\python39\include -Ic:\users\conno\appdata\local\programs\python\python39\include -Ideps\c-ares\src -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include /Tcbuild\temp.win-amd64-3.9\Release\_cares.c /Fobuild\temp.win-amd64-3.9\Release\build\temp.win-amd64-3.9\Release\_cares.obj
  _cares.c
  c:\users\conno\appdata\local\programs\python\python39\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------```

If you check this page: https://pypi.org/project/pycares/3.1.1/#files - you see that there is no wheel for Python 3.9.

You can either:

  1. downgrade to 3.8
  2. ask the maintainer of pycares to release wheel for 3.9
  3. try to get the package compiling.

Actual error is C1083: Cannot open include file: 'io.h': No such file or directory which sort of indicates that you havent activated visual studio dev environment in the shell you are trying to install the package in. Or, you dont have windows sdk installed. See answers in: Cannot open include file: 'io.h': No such file or directory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM