安装Dragnet时无法在python包上导入<iconv.h>

时间:2019-11-25 16:12:45

标签: python visual-studio iconv packageinstaller

我的环境:

  • Windows 10
  • Python2.7

由于无法打开包含文件而发生的错误:'iconv.h':没有此类文件或目录

    PS C:\MAMP\htdocs\my-project> pip install dragnet
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting dragnet
  Using cached https://files.pythonhosted.org/packages/b9/1b/56d1c4839cd9ecdd8b8b248be6ebb872f814e8a0834355961f4686a12707/dragnet-2.0.4.tar.gz
Requirement already satisfied: Cython>=0.21.1 in c:\python27\lib\site-packages (from dragnet) (0.29.14)
Requirement already satisfied: ftfy<5.0.0,>=4.1.0 in c:\python27\lib\site-packages (from dragnet) (4.4.3)
Requirement already satisfied: lxml in c:\python27\lib\site-packages (from dragnet) (4.4.1)
Requirement already satisfied: numpy>=1.11.0 in c:\python27\lib\site-packages (from dragnet) (1.16.1)
Requirement already satisfied: scikit-learn<0.21.0,>=0.15.2 in c:\python27\lib\site-packages (from dragnet) (0.18.2)
Requirement already satisfied: scipy>=0.17.0 in c:\python27\lib\site-packages (from dragnet) (1.2.2)
Requirement already satisfied: html5lib in c:\python27\lib\site-packages (from ftfy<5.0.0,>=4.1.0->dragnet) (1.0.1)
Requirement already satisfied: wcwidth in c:\python27\lib\site-packages (from ftfy<5.0.0,>=4.1.0->dragnet) (0.1.7)
Requirement already satisfied: webencodings in c:\python27\lib\site-packages (from html5lib->ftfy<5.0.0,>=4.1.0->dragnet) (0.5.1)
Requirement already satisfied: six>=1.9 in c:\python27\lib\site-packages (from html5lib->ftfy<5.0.0,>=4.1.0->dragnet) (1.12.0)
Installing collected packages: dragnet
  Running setup.py install for dragnet ... error
    ERROR: Command errored out with exit status 1:
...
    C:\Users\MyUser\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
    c:\python27\lib\site-packages\lxml\includes\libxml/encoding.h(28) : fatal error C1083: Cannot open include file: 'iconv.h': No such file or directory
    error: command 'C:\\Users\\MyUser\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\devwar~1\\appdata\\local\\temp\\pip-install-kk1fuz\\dragnet\\setup.py'"'"'; __file__='"'"'c:\\users\\devwar~1\\appdata\\local\\temp\\pip-install-kk1fuz\\dragnet\\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\devwar~1\appdata\local\temp\pip-record-q2fmr2\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

0 个答案:

没有答案