Не удалось найти функцию xmlCheckVersion в библиотеке libxml2. Установлен ли libxml2? в Windows 10 или 7

Я видел, что этот вопрос часто возникал на многих форумах, но после ответов на форумы я все еще не могу установить некоторые библиотеки под Windows. Я говорю Windows, потому что на Mac и Linux это заняло у меня максимум 15 минут.

Моя проблема под Windows 10 и 7. Я всегда получаю ту же ошибку:

*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************

Я зашел на этот сайт и получил Lxml, привязку для библиотек libxml2 и libxslt. "Я выполнил установку с помощью pip. Верной верной версией, в противном случае мы имеем ошибку, что эта библиотека не адаптирована: https://www.lfd.uci.edu/~gohlke/pythonlibs/

Для xmlsec я не нашел версию для python в 3.7 для Windows.

Я следовал процедуре, указанной в этом посте, но она не работает: установка lxml, libxml2, libxslt для Python 3.5 в Windows 10

Если у вас есть идея, я возьму ее.

Error:

(venv) C:\Dev\python3-saml\demo-django>pip install onelogin
Collecting onelogin
  Using cached https ://files.pythonhosted.org/packages/24/3e/383caffe8931745c2f646bbbf46209181e90fb99ceee3d8394cdd633e16e/on
elogin-1.5.3-py3-none-any.whl
Collecting lxml==4.2.3 (from onelogin)
  Using cached https ://files.pythonhosted.org/packages/54/a6/43be8cf1cc23e3fa208cab04ba2f9c3b7af0233aab32af6b5089122b44cd/lx
ml-4.2.3.tar.gz
Collecting defusedxml==0.5.0 (from onelogin)
  Using cached https ://files.pythonhosted.org/packages/87/1c/17f3e3935a913dfe2a5ca85fa5ccbef366bfd82eb318b1f75dadbf0affca/de
fusedxml-0.5.0-py2.py3-none-any.whl
Collecting python-dateutil==2.7.3 (from onelogin)
  Using cached https ://files.pythonhosted.org/packages/cf/f5/af2b09c957ace60dcfac112b669c45c8c97e32f94aa8b56da4c6d1682825/py
thon_dateutil-2.7.3-py2.py3-none-any.whl
Collecting requests==2.20.1 (from onelogin)
  Using cached https ://files.pythonhosted.org/packages/ff/17/5cbb026005115301a8fb2f9b0e3e8d32313142fe8b617070e7baad20554f/re
quests-2.20.1-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil==2.7.3->onelogin)
  Using cached https ://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/si
x-1.12.0-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests==2.20.1->onelogin)
  Using cached https ://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/ch
ardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3<1.25,>=1.21.1 (from requests==2.20.1->onelogin)
  Using cached https ://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/ur
llib3-1.24.1-py2.py3-none-any.whl
Collecting idna<2.8,>=2.5 (from requests==2.20.1->onelogin)
  Using cached https ://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/id
na-2.7-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests==2.20.1->onelogin)
  Using cached https ://files.pythonhosted.org/packages/9f/e0/accfc1b56b57e9750eba272e24c4dddeac86852c2bebd1236674d7887e8a/ce
rtifi-2018.11.29-py2.py3-none-any.whl
Installing collected packages: lxml, defusedxml, six, python-dateutil, chardet, urllib3, idna, certifi, requests, onelogin
  Running setup.py install for lxml ... error
    Complete output from command C:\Dev\python3-saml\demo-django\venv\Scripts\python.exe -u -c "import setuptools, tokenize;
__file__='C:\\Users\\NetGus\\AppData\\Local\\Temp\\pip-install-x03lowli\\lxml\\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\NetG
us\AppData\Local\Temp\pip-record-feymms69\install-record.txt --single-version-externally-managed --compile --install-headers
 C:\Dev\python3-saml\demo-django\venv\include\site\python3.7\lxml:
    Building lxml version 4.2.3.
    Building without Cython.
    ERROR: b"'xslt-config' n'est pas reconnu en tant que commande interne\r\nou externe, un programme ex\x82cutable ou un fi
chier de commandes.\r\n"
    ** make sure the development packages of libxml2 and libxslt are installed **

    Using build configuration of libxslt
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\lxml
    copying src\lxml\builder.py -> build\lib.win-amd64-3.7\lxml
    copying src\lxml\cssselect.py -> build\lib.win-amd64-3.7\lxml
    copying src\lxml\doctestcompare.py -> build\lib.win-amd64-3.7\lxml
    copying src\lxml\ElementInclude.py -> build\lib.win-amd64-3.7\lxml
    copying src\lxml\pyclasslookup.py -> build\lib.win-amd64-3.7\lxml
    copying src\lxml\sax.py -> build\lib.win-amd64-3.7\lxml
    copying src\lxml\usedoctest.py -> build\lib.win-amd64-3.7\lxml
    copying src\lxml\_elementpath.py -> build\lib.win-amd64-3.7\lxml
    copying src\lxml\__init__.py -> build\lib.win-amd64-3.7\lxml
    creating build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\__init__.py -> build\lib.win-amd64-3.7\lxml\includes
    creating build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\builder.py -> build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\clean.py -> build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\defs.py -> build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\diff.py -> build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\ElementSoup.py -> build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\formfill.py -> build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\html5parser.py -> build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\soupparser.py -> build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\usedoctest.py -> build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\_diffcommand.py -> build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\_html5builder.py -> build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\_setmixin.py -> build\lib.win-amd64-3.7\lxml\html
    copying src\lxml\html\__init__.py -> build\lib.win-amd64-3.7\lxml\html
    creating build\lib.win-amd64-3.7\lxml\isoschematron
    copying src\lxml\isoschematron\__init__.py -> build\lib.win-amd64-3.7\lxml\isoschematron
    copying src\lxml\etree.h -> build\lib.win-amd64-3.7\lxml
    copying src\lxml\etree_api.h -> build\lib.win-amd64-3.7\lxml
    copying src\lxml\lxml.etree.h -> build\lib.win-amd64-3.7\lxml
    copying src\lxml\lxml.etree_api.h -> build\lib.win-amd64-3.7\lxml
    copying src\lxml\includes\c14n.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\config.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\dtdvalid.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\etreepublic.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\htmlparser.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\relaxng.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\schematron.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\tree.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\uri.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\xinclude.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\xmlerror.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\xmlparser.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\xmlschema.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\xpath.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\xslt.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\__init__.pxd -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\etree_defs.h -> build\lib.win-amd64-3.7\lxml\includes
    copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-3.7\lxml\includes
    creating build\lib.win-amd64-3.7\lxml\isoschematron\resources
    creating build\lib.win-amd64-3.7\lxml\isoschematron\resources\rng
    copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win-amd64-3.7\lxml\isoschematron\resources\
rng
    creating build\lib.win-amd64-3.7\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win-amd64-3.7\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win-amd64-3.7\lxml\isoschematron\resources\xsl
    creating build\lib.win-amd64-3.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win-amd64-3.7\lxm
l\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win-amd64-3.7\lxml\i
soschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win-amd64-3.7\
lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win
-amd64-3.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win-amd64-3.7\lxml
\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win-amd64-3.7\lxml\isoschematr
on\resources\xsl\iso-schematron-xslt1
    running build_ext
    building 'lxml.etree' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\src
    creating build\temp.win-amd64-3.7\Release\src\lxml
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nolo
go /Ox /W3 /GL /DNDEBUG /MD -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc\lxml\includes -IC:\Dev\python3-saml\demo-django\venv\i
nclude -IC:\Python\Anaconda3\include -IC:\Python\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Bu
ildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Progr
am Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\u
m" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\1
0.0.17763.0\cppwinrt" /Tcsrc\lxml\etree.c /Fobuild\temp.win-amd64-3.7\Release\src\lxml\etree.obj -w
    clÿ: Ligne de commande warning D9025ÿ: substitution de '/W3' par '/w'
    etree.c
    c:\users\netgus\appdata\local\temp\pip-install-x03lowli\lxml\src\lxml\includes/etree_defs.h(14): fatal error C1083: Impo
ssible d'ouvrir le fichier includeÿ: 
    Compile failed: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.2702
3\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    creating Users
    creating Users\NetGus
    creating Users\NetGus\AppData
    creating Users\NetGus\AppData\Local
    creating Users\NetGus\AppData\Local\Temp
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nolo
go /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tool
s\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\W
indows 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\cppw
inrt" /TcC:\Users\NetGus\AppData\Local\Temp\xmlXPathInitqpz5rxxf.c /FoUsers\NetGus\AppData\Local\Temp\xmlXPathInitqpz5rxxf.o
bj
    xmlXPathInitqpz5rxxf.c
    C:\Users\NetGus\AppData\Local\Temp\xmlXPathInitqpz5rxxf.c(1): fatal error C1083: Impossible d'ouvrir le fichier includeÿ
: 'libxml/xpath.h'ÿ: No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\H
ostX86\\x64\\cl.exe' failed with exit status 2
    *********************************************************************************
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    *********************************************************************************

    ----------------------------------------
Command "C:\Dev\python3-saml\demo-django\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Net
Gus\\AppData\\Local\\Temp\\pip-install-x03lowli\\lxml\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().r
eplace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\NetGus\AppData\Local\Temp\pi
p-record-feymms69\install-record.txt --single-version-externally-managed --compile --install-headers C:\Dev\python3-saml\dem
o-django\venv\include\site\python3.7\lxml" failed with error code 1 in C:\Users\NetGus\AppData\Local\Temp\pip-install-x03low
li\lxml\

0 ответов

Другие вопросы по тегам