requests-xml
requests-xml copied to clipboard
Python3.9 install fails
Python: 3.9.0 OS: Mac Catalina 10.15.7 (with latest XCode, see end)
Appears to be an issue with lxml-4.5.X. Note that lxml 4.4.3 installs fine, not sure how that might impact requests-xml though.
% pip install requests-xml
Collecting requests-xml
Using cached requests_xml-0.2.3-py2.py3-none-any.whl (11 kB)
Collecting parse
Using cached parse-1.18.0.tar.gz (30 kB)
Collecting pyquery
Downloading pyquery-1.4.1-py2.py3-none-any.whl (22 kB)
Collecting fake-useragent
Using cached fake-useragent-0.1.11.tar.gz (13 kB)
Collecting requests
Using cached requests-2.24.0-py2.py3-none-any.whl (61 kB)
Collecting xmljson
Using cached xmljson-0.2.1-py2.py3-none-any.whl (10 kB)
Collecting w3lib
Using cached w3lib-1.22.0-py2.py3-none-any.whl (20 kB)
Collecting cssselect>0.7.9
Downloading cssselect-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting lxml>=2.1
Downloading lxml-4.5.2.tar.gz (4.5 MB)
|████████████████████████████████| 4.5 MB 2.5 MB/s
Collecting chardet<4,>=3.0.2
Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
|████████████████████████████████| 133 kB 2.6 MB/s
Collecting certifi>=2017.4.17
Downloading certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
|████████████████████████████████| 156 kB 2.6 MB/s
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Downloading urllib3-1.25.10-py2.py3-none-any.whl (127 kB)
|████████████████████████████████| 127 kB 2.7 MB/s
Collecting idna<3,>=2.5
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
|████████████████████████████████| 58 kB 2.0 MB/s
Collecting six>=1.4.1
Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Using legacy 'setup.py install' for parse, since package 'wheel' is not installed.
Using legacy 'setup.py install' for fake-useragent, since package 'wheel' is not installed.
Using legacy 'setup.py install' for lxml, since package 'wheel' is not installed.
Installing collected packages: parse, cssselect, lxml, pyquery, fake-useragent, chardet, certifi, urllib3, idna, requests, xmljson, six, w3lib, requests-xml
Running setup.py install for parse ... done
Running setup.py install for lxml ... error
ERROR: Command errored out with exit status 1:
command: /Users/userid/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6z/45fw644555v5gb1dddjdq2t00000gn/T/pip-install-z65ovv22/lxml/setup.py'"'"'; __file__='"'"'/private/var/folders/6z/45fw644555v5gb1dddjdq2t00000gn/T/pip-install-z65ovv22/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 /private/var/folders/6z/45fw644555v5gb1dddjdq2t00000gn/T/pip-record-ix4rg6pi/install-record.txt --single-version-externally-managed --compile --install-headers /Users/userid/venv/include/site/python3.9/lxml
cwd: /private/var/folders/6z/45fw644555v5gb1dddjdq2t00000gn/T/pip-install-z65ovv22/lxml/
Complete output (98 lines):
Building lxml version 4.5.2.
Building without Cython.
Building against libxml2 2.9.4 and libxslt 1.1.29
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.9
creating build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/_elementpath.py -> build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/sax.py -> build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/builder.py -> build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/doctestcompare.py -> build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/usedoctest.py -> build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/cssselect.py -> build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/ElementInclude.py -> build/lib.macosx-10.9-x86_64-3.9/lxml
creating build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
creating build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/defs.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/clean.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/formfill.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/builder.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
copying src/lxml/html/diff.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/html
creating build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron
copying src/lxml/etree.h -> build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/etree_api.h -> build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/lxml.etree.h -> build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.macosx-10.9-x86_64-3.9/lxml
copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/__init__.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.macosx-10.9-x86_64-3.9/lxml/includes
creating build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources
creating build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources/rng
creating build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources/xsl
creating build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.9-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9/src
creating build/temp.macosx-10.9-x86_64-3.9/src/lxml
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/Users/userid/venv/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/lxml/etree.c -o build/temp.macosx-10.9-x86_64-3.9/src/lxml/etree.o -w -flat_namespace
In file included from src/lxml/etree.c:704:
src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
Compile failed: command '/usr/bin/gcc' failed with exit code 1
creating var
creating var/folders
creating var/folders/6z
creating var/folders/6z/45fw644555v5gb1dddjdq2t00000gn
creating var/folders/6z/45fw644555v5gb1dddjdq2t00000gn/T
cc -I/usr/include/libxml2 -c /var/folders/6z/45fw644555v5gb1dddjdq2t00000gn/T/xmlXPathInitr1boc4vj.c -o var/folders/6z/45fw644555v5gb1dddjdq2t00000gn/T/xmlXPathInitr1boc4vj.o
/var/folders/6z/45fw644555v5gb1dddjdq2t00000gn/T/xmlXPathInitr1boc4vj.c:1:10: fatal error: 'libxml/xpath.h' file not found
#include "libxml/xpath.h"
^~~~~~~~~~~~~~~~
1 error generated.
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
Perhaps try: xcode-select --install
*********************************************************************************
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/userid/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6z/45fw644555v5gb1dddjdq2t00000gn/T/pip-install-z65ovv22/lxml/setup.py'"'"'; __file__='"'"'/private/var/folders/6z/45fw644555v5gb1dddjdq2t00000gn/T/pip-install-z65ovv22/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 /private/var/folders/6z/45fw644555v5gb1dddjdq2t00000gn/T/pip-record-ix4rg6pi/install-record.txt --single-version-externally-managed --compile --install-headers /Users/userid/venv/include/site/python3.9/lxml Check the logs for full command output.
XCode:
% gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.8)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
@rtphokie do you found a solution for this?
no
After switch (using pyenv
) to 3.8.0, works correctly on Darwin.
Same is true of downgrading to Python 3.7. I'd call this a workaround, not a solution.
On Thu, Oct 29, 2020 at 6:05 PM Bruno Wego [email protected] wrote:
After switch (using pyenv) to 3.8.0, works correctly on Darwin.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/erinxocon/requests-xml/issues/8#issuecomment-719050747, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEGSEKR5ZWZRWMHQXHG2JLSNHRJBANCNFSM4SH2GOYQ .