Then i download lxml with command pip install lxml in visual studio code i get this mistake:
Collecting lxml
Using cached lxml-4.9.1.tar.gz (3.4 MB)
Preparing metadata (setup.py) ... done
Installing collected packages: lxml
DEPRECATION: lxml is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for lxml ... error
error: subprocess-exited-with-error
× Running setup.py install for lxml did not run successfully.
│ exit code: 1
╰─> [76 lines of output]
Building lxml version 4.9.1.
Building without Cython.
Building against pre-built libxml2 andl libxslt libraries
running install
C:\Users\79628\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\lxml
copying src\lxml\builder.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\cssselect.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\doctestcompare.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\ElementInclude.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\pyclasslookup.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\sax.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\usedoctest.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\_elementpath.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\__init__.py -> build\lib.win-amd64-cpython-311\lxml
creating build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\__init__.py -> build\lib.win-amd64-cpython-311\lxml\includes
creating build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\builder.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\clean.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\defs.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\diff.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\formfill.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\_diffcommand.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\_html5builder.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\_setmixin.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\__init__.py -> build\lib.win-amd64-cpython-311\lxml\html
creating build\lib.win-amd64-cpython-311\lxml\isoschematron
copying src\lxml\isoschematron\__init__.py -> build\lib.win-amd64-cpython-311\lxml\isoschematron
copying src\lxml\etree.h -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\etree_api.h -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\lxml.etree.h -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\lxml.etree_api.h -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\includes\c14n.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\config.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\dtdvalid.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\etreepublic.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\htmlparser.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\relaxng.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\schematron.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\tree.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\uri.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\xinclude.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\xmlerror.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\xmlparser.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\xmlschema.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\xpath.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\xslt.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\__init__.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\etree_defs.h -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-cpython-311\lxml\includes
creating build\lib.win-amd64-cpython-311\lxml\isoschematron\resources
creating build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\rng
creating build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl
creating build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win-amd64-cpython-311\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-cpython-311\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-cpython-311\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> lxml
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Other libraries download fine except lxml
How can i get rid of it? Maybe someone faced such a problem?
I also try it in pycharm, but it didn't work too.
I need in visual studio code.
I will be very grateful for the solution
Did you see this part of the error message:
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
You need the Visual C++ compiler to build this package on your computer.
Related
I am trying to install harwest on my win11 laptop with AMD in it.
When I try to install it using pip install harwest I am getting the following output
Collecting harwest
Using cached harwest-0.3.2-py3-none-any.whl (17 kB)
Collecting beautifulsoup4==4.8.2
Using cached beautifulsoup4-4.8.2-py3-none-any.whl (106 kB)
Requirement already satisfied: requests in c:\msys64\mingw64\lib\python3.10\site-packages (from harwest) (2.28.2)
Requirement already satisfied: gitdb2 in c:\msys64\mingw64\lib\python3.10\site-packages (from harwest) (4.0.2)
Collecting gitpython==3.0.6
Using cached GitPython-3.0.6-py3-none-any.whl (451 kB)
Collecting lxml
Using cached lxml-4.9.2.tar.gz (3.7 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: soupsieve>=1.2 in c:\msys64\mingw64\lib\python3.10\site-packages (from beautifulsoup4==4.8.2->harwest) (2.4)
Requirement already satisfied: gitdb>=4.0.1 in c:\msys64\mingw64\lib\python3.10\site-packages (from gitdb2->harwest) (4.0.10)
Requirement already satisfied: certifi>=2017.4.17 in c:\msys64\mingw64\lib\python3.10\site-packages (from requests->harwest) (2022.12.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\msys64\mingw64\lib\python3.10\site-packages (from requests->harwest) (1.26.14)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\msys64\mingw64\lib\python3.10\site-packages (from requests->harwest) (3.0.1)
Requirement already satisfied: idna<4,>=2.5 in c:\msys64\mingw64\lib\python3.10\site-packages (from requests->harwest) (3.4)
Requirement already satisfied: smmap<6,>=3.0.1 in c:\msys64\mingw64\lib\python3.10\site-packages (from gitdb>=4.0.1->gitdb2->harwest) (5.0.0)
Building wheels for collected packages: lxml
Building wheel for lxml (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [102 lines of output]
Building lxml version 4.9.2.
Building without Cython.
Building against pre-built libxml2 andl libxslt libraries
running bdist_wheel
running build
running build_py
creating build
creating build\lib.mingw_x86_64-cpython-310
creating build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\builder.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\cssselect.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\doctestcompare.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\ElementInclude.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\pyclasslookup.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\sax.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\usedoctest.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\_elementpath.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\__init__.py -> build\lib.mingw_x86_64-cpython-310\lxml
creating build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\__init__.py -> build\lib.mingw_x86_64-cpython-310\lxml\includes
creating build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\builder.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\clean.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\defs.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\diff.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\formfill.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\_diffcommand.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\_html5builder.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\_setmixin.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\__init__.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
creating build\lib.mingw_x86_64-cpython-310\lxml\isoschematron
copying src\lxml\isoschematron\__init__.py -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron
copying src\lxml\etree.h -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\etree_api.h -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\lxml.etree.h -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\lxml.etree_api.h -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\etree.pyx -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\objectify.pyx -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\apihelpers.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\classlookup.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\cleanup.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\debug.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\docloader.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\dtd.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\extensions.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\iterparse.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\nsclasses.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\objectpath.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\parser.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\parsertarget.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\proxy.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\public-api.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\readonlytree.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\relaxng.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\saxparser.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\schematron.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\serializer.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xinclude.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xmlerror.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xmlid.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xmlschema.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xpath.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xslt.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xsltext.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\includes\c14n.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\config.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\dtdvalid.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\etreepublic.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\htmlparser.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\relaxng.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\schematron.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\tree.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\uri.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\xinclude.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\xmlerror.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\xmlparser.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\xmlschema.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\xpath.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\xslt.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\__init__.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\etree_defs.h -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\lxml-version.h -> build\lib.mingw_x86_64-cpython-310\lxml\includes
creating build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources
creating build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\rng
creating build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl
creating build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
error: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for lxml
Running setup.py clean for lxml
Failed to build lxml
Installing collected packages: lxml, beautifulsoup4, gitpython, harwest
Running setup.py install for lxml ... error
error: subprocess-exited-with-error
× Running setup.py install for lxml did not run successfully.
│ exit code: 1
╰─> [104 lines of output]
Building lxml version 4.9.2.
Building without Cython.
Building against pre-built libxml2 andl libxslt libraries
running install
C:\msys64\mingw64\lib\python3.10\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.mingw_x86_64-cpython-310
creating build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\builder.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\cssselect.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\doctestcompare.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\ElementInclude.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\pyclasslookup.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\sax.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\usedoctest.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\_elementpath.py -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\__init__.py -> build\lib.mingw_x86_64-cpython-310\lxml
creating build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\__init__.py -> build\lib.mingw_x86_64-cpython-310\lxml\includes
creating build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\builder.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\clean.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\defs.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\diff.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\formfill.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\_diffcommand.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\_html5builder.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\_setmixin.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
copying src\lxml\html\__init__.py -> build\lib.mingw_x86_64-cpython-310\lxml\html
creating build\lib.mingw_x86_64-cpython-310\lxml\isoschematron
copying src\lxml\isoschematron\__init__.py -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron
copying src\lxml\etree.h -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\etree_api.h -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\lxml.etree.h -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\lxml.etree_api.h -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\etree.pyx -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\objectify.pyx -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\apihelpers.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\classlookup.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\cleanup.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\debug.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\docloader.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\dtd.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\extensions.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\iterparse.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\nsclasses.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\objectpath.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\parser.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\parsertarget.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\proxy.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\public-api.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\readonlytree.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\relaxng.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\saxparser.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\schematron.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\serializer.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xinclude.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xmlerror.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xmlid.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xmlschema.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xpath.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xslt.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\xsltext.pxi -> build\lib.mingw_x86_64-cpython-310\lxml
copying src\lxml\includes\c14n.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\config.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\dtdvalid.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\etreepublic.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\htmlparser.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\relaxng.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\schematron.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\tree.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\uri.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\xinclude.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\xmlerror.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\xmlparser.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\xmlschema.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\xpath.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\xslt.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\__init__.pxd -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\etree_defs.h -> build\lib.mingw_x86_64-cpython-310\lxml\includes
copying src\lxml\includes\lxml-version.h -> build\lib.mingw_x86_64-cpython-310\lxml\includes
creating build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources
creating build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\rng
creating build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl
creating build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.mingw_x86_64-cpython-310\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
error: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> lxml
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I tried installing lxml from https://www.lfd.uci.edu/~gohlke/pythonlibs/ but no matter whatever file I try it says ERROR: lxml-4.9.0-cp311-cp311-win_amd64.whl is not a supported wheel on this platform. then I tried this command py -m pip install -r requirements.txt Collecting gitpython==3.0.6 which in the log downloaded what I think is the lxml
Using cached GitPython-3.0.6-py3-none-any.whl (451 kB)
Collecting gitdb2
Using cached gitdb2-4.0.2-py3-none-any.whl (1.1 kB)
Collecting lxml
Downloading lxml-4.9.2-cp311-cp311-win_amd64.whl (3.8 MB)
---------------------------------------- 3.8/3.8 MB 2.4 MB/s eta 0:00:00
Collecting beautifulsoup4==4.8.2
Using cached beautifulsoup4-4.8.2-py3-none-any.whl (106 kB)
Collecting requests
Using cached requests-2.28.2-py3-none-any.whl (62 kB)
Collecting soupsieve>=1.2
Using cached soupsieve-2.4-py3-none-any.whl (37 kB)
Collecting gitdb>=4.0.1
Using cached gitdb-4.0.10-py3-none-any.whl (62 kB)
Collecting charset-normalizer<4,>=2
Downloading charset_normalizer-3.0.1-cp311-cp311-win_amd64.whl (96 kB)
---------------------------------------- 96.0/96.0 kB 1.1 MB/s eta 0:00:00
Collecting idna<4,>=2.5
Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.14-py2.py3-none-any.whl (140 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting smmap<6,>=3.0.1
Using cached smmap-5.0.0-py3-none-any.whl (24 kB)
Installing collected packages: charset-normalizer, urllib3, soupsieve, smmap, lxml, idna, certifi, requests, gitdb, beautifulsoup4, gitdb2, gitpython
Successfully installed beautifulsoup4-4.8.2 certifi-2022.12.7 charset-normalizer-3.0.1 gitdb-4.0.10 gitdb2-4.0.2 gitpython-3.0.6 idna-3.4 lxml-4.9.2 requests-2.28.2 smmap-5.0.0 soupsieve-2.4 urllib3-1.26.14
but my main command harwest still gives the above error of legacy-install-failure .
I also downloaded microsoft build tools without the optional stuff and its still not working
I have installed python 10 and 11 although in cmd it shows 10 only
I am at a loss, Please help
I suspect these are the relevant messages from the output:,
python setup.py bdist_wheel did not run successfully
Wheel did not finish (Wheel automates some of the package installation process, in this case nileshsah/harwest-tool).
error: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
Wheel parameter --plat-name value is not one of the supported values, the package author specifies what platforms their package has been designed in this case 4 types of win systems)
This error originates from a subprocess, and is likely not a problem with pip.
Second confirmation it's not pip or wheel code fault
Conclusion, I suspect nileshsah/harwest-tool may not be compatible with your system. It is possible to specify CPU Architecture of a Python package, this may require careful thought on your part or trial and error (on a non-critical Python installation) to see if nileshsah/harwest-tool is compatible with your system.
(Finally, Hello and Welcome to stackoverflow)
I'm trying to install Scrapy in my Macbook M1 with macOS Ventura 13.0.1, but it is throwing an error while trying to install lxml.
Installing collected packages: lxml, jmespath, itemadapter, idna, filelock, cssselect, charset-normalizer, cffi, certifi, attrs, requests, parsel, hyperlink, cryptography, Automat, Twisted, service-identity, requests-file, pyOpenSSL, itemloaders, tldextract, scrapy
Running setup.py install for lxml ... error
error: subprocess-exited-with-error
× Running setup.py install for lxml did not run successfully.
│ exit code: 1
╰─> [115 lines of output]
Building lxml version 4.9.2.
Building without Cython.
Building against libxml2 2.9.13 and libxslt 1.1.35
running install
/Users/tomasazevedo/Documents/py_scripts/webscraping_test/env/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-39
creating build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/_elementpath.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/sax.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/builder.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/doctestcompare.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/usedoctest.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/cssselect.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/ElementInclude.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml
creating build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
creating build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/defs.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/clean.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/formfill.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/builder.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
copying src/lxml/html/diff.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/html
creating build/lib.macosx-10.9-universal2-cpython-39/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/lxml/isoschematron
copying src/lxml/etree.h -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/etree_api.h -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/lxml.etree.h -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/objectify.pyx -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/etree.pyx -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/public-api.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/xmlid.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/cleanup.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/xslt.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/xpath.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/debug.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/serializer.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/classlookup.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/saxparser.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/objectpath.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/relaxng.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/xinclude.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/iterparse.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/parser.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/dtd.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/apihelpers.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/xmlerror.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/readonlytree.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/extensions.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/xmlschema.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/schematron.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/docloader.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/nsclasses.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/parsertarget.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/xsltext.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/proxy.pxi -> build/lib.macosx-10.9-universal2-cpython-39/lxml
copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/__init__.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.macosx-10.9-universal2-cpython-39/lxml/includes
creating build/lib.macosx-10.9-universal2-cpython-39/lxml/isoschematron/resources
creating build/lib.macosx-10.9-universal2-cpython-39/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.9-universal2-cpython-39/lxml/isoschematron/resources/rng
creating build/lib.macosx-10.9-universal2-cpython-39/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-10.9-universal2-cpython-39/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-10.9-universal2-cpython-39/lxml/isoschematron/resources/xsl
creating build/lib.macosx-10.9-universal2-cpython-39/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-universal2-cpython-39/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-universal2-cpython-39/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-universal2-cpython-39/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-universal2-cpython-39/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-universal2-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.9-universal2-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.9-universal2-cpython-39
creating build/temp.macosx-10.9-universal2-cpython-39/src
creating build/temp.macosx-10.9-universal2-cpython-39/src/lxml
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/Users/tomasazevedo/Documents/py_scripts/webscraping_test/env/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -c src/lxml/etree.c -o build/temp.macosx-10.9-universal2-cpython-39/src/lxml/etree.o -w -flat_namespace
src/lxml/etree.c:96:10: fatal error: 'Python.h' file not found
#include "Python.h"
^~~~~~~~~~
1 error generated.
Compile failed: command '/usr/bin/clang' failed with exit code 1
cc -I/usr/include/libxml2 -c /var/folders/zv/tjy58slj5mb96l_9g6x105r00000gn/T/xmlXPathInitbd2u4ada.c -o var/folders/zv/tjy58slj5mb96l_9g6x105r00000gn/T/xmlXPathInitbd2u4ada.o
cc var/folders/zv/tjy58slj5mb96l_9g6x105r00000gn/T/xmlXPathInitbd2u4ada.o -lxml2 -o a.out
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> lxml
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I've tried a bunch of things to try to install lxml on its own, but to no avail, the error is always the same.
I have the most recent Python version 3.9.6
Does anyone have any idea how to solve this?
Thanks in advance.
For some reason was able to install lxml and scrapy outside the virtual environment.
had the same issue in a venv using 3.9; upgraded to 3.10 and it resolved
This question already has answers here:
pygame installation issue in mac os
(5 answers)
Closed 3 years ago.
I am trying to install pygame for Python 3 on an anaconda install.
I run pip install pygame, and it outputs the following:
Collecting pygame
Using cached pygame-1.9.3.tar.gz
Building wheels for collected packages: pygame
Running setup.py bdist_wheel for pygame ... error
Complete output from command //anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/pip-build-2n_0kk3y/pygame/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 /var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/tmpybu68q2lpip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.6-x86_64-3.5
creating build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/_camera_opencv_highgui.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/_camera_vidcapture.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/_dummybackend.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/_numpysndarray.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/_numpysurfarray.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/camera.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/colordict.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/compat.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/cursors.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/font.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/freetype.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/ftfont.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/locals.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/macosx.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/midi.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/pkgdata.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/sndarray.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/sprite.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/surfarray.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/sysfont.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/version.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
creating build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
copying lib/gp2x/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
copying lib/gp2x/constants.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
copying lib/gp2x/locals.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
creating build/lib.macosx-10.6-x86_64-3.5/pygame/threads
copying lib/threads/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/threads
copying lib/threads/Py25Queue.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/threads
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/__main__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/base_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/blit_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/bufferproxy_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/camera_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/cdrom_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/cdrom_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/color_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/compat_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/cursors_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/display_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/draw_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/event_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/fastevent_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/font_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/font_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/freetype_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/freetype_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/ftfont_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/ftfont_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/gfxdraw_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/image__save_gl_surface_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/image_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/image_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/imageext_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/imageext_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/joystick_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/key_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/mask_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/math_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/midi_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/midi_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/mixer_music_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/mixer_music_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/mixer_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/mixer_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/mouse_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/overlay_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/pixelarray_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/pixelcopy_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/rect_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/rwobject_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/scrap_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/scrap_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/sndarray_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/sndarray_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/sprite_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/surface_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/surfarray_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/surfarray_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/surflock_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/sysfont_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/test_test_.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/threads_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/time_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/transform_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/arrinter.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/async_sub.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/buftools.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/endian.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/png.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/run_tests.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/test_machinery.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/test_runner.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests
copying test/run_tests__tests/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests
copying test/run_tests__tests/run_tests__test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/fake_2_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/fake_3_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/fake_4_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/fake_5_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/fake_6_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/no_assertions__ret_code_of_1__test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/zero_tests_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/failures1
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
copying test/run_tests__tests/incomplete_todo/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
copying test/run_tests__tests/incomplete_todo/fake_2_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
copying test/run_tests__tests/incomplete_todo/fake_3_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/exclude
copying test/run_tests__tests/exclude/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/exclude
copying test/run_tests__tests/exclude/fake_2_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/exclude
copying test/run_tests__tests/exclude/invisible_tag_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/exclude
copying test/run_tests__tests/exclude/magic_tag_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/exclude
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/timeout
copying test/run_tests__tests/timeout/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/timeout
copying test/run_tests__tests/timeout/fake_2_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/timeout
copying test/run_tests__tests/timeout/sleep_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/timeout
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/everything
copying test/run_tests__tests/everything/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/everything
copying test/run_tests__tests/everything/fake_2_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/everything
copying test/run_tests__tests/everything/incomplete_todo_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/everything
copying test/run_tests__tests/everything/magic_tag_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/everything
copying test/run_tests__tests/everything/sleep_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/everything
creating build/lib.macosx-10.6-x86_64-3.5/pygame/docs
copying docs/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/docs
copying docs/__main__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/docs
creating build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/aacircle.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/aliens.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/arraydemo.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/blend_fill.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/blit_blends.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/camera.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/chimp.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/cursors.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/eventlist.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/fastevents.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/fonty.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/freetype_misc.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/glcube.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/headless_no_windows_needed.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/liquid.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/mask.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/midi.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/moveit.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/oldalien.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/overlay.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/pixelarray.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/playmus.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/prevent_display_stretching.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/scaletest.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/scrap_clipboard.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/scroll.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/sound.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/sound_array_demos.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/stars.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/testsprite.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/vgrade.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
running build_ext
building 'pygame.scrap' extension
creating build/temp.macosx-10.6-x86_64-3.5
creating build/temp.macosx-10.6-x86_64-3.5/src
/usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I//anaconda/include -arch x86_64 -DENABLE_NEWBUF=1 -I/NEED_INC_PATH_FIX -I//anaconda/include/python3.5m -c src/scrap.c -o build/temp.macosx-10.6-x86_64-3.5/src/scrap.o
src/scrap.c:27:10: fatal error: 'SDL.h' file not found
#include "SDL.h"
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Failed building wheel for pygame
Running setup.py clean for pygame
Failed to build pygame
Installing collected packages: pygame
Running setup.py install for pygame ... error
Complete output from command //anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/pip-build-2n_0kk3y/pygame/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/pip-yhcf0tlb-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-x86_64-3.5
creating build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/_camera_opencv_highgui.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/_camera_vidcapture.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/_dummybackend.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/_numpysndarray.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/_numpysurfarray.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/camera.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/colordict.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/compat.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/cursors.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/font.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/freetype.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/ftfont.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/locals.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/macosx.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/midi.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/pkgdata.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/sndarray.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/sprite.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/surfarray.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/sysfont.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
copying lib/version.py -> build/lib.macosx-10.6-x86_64-3.5/pygame
creating build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
copying lib/gp2x/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
copying lib/gp2x/constants.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
copying lib/gp2x/locals.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/gp2x
creating build/lib.macosx-10.6-x86_64-3.5/pygame/threads
copying lib/threads/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/threads
copying lib/threads/Py25Queue.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/threads
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/__main__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/base_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/blit_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/bufferproxy_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/camera_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/cdrom_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/cdrom_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/color_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/compat_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/cursors_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/display_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/draw_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/event_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/fastevent_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/font_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/font_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/freetype_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/freetype_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/ftfont_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/ftfont_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/gfxdraw_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/image__save_gl_surface_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/image_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/image_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/sprite_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/surface_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/surfarray_tags.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/surfarray_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/surflock_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/sysfont_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/test_test_.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/threads_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/time_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
copying test/transform_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/arrinter.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/async_sub.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/buftools.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/endian.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/png.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/run_tests.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/test_machinery.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
copying test/test_utils/test_runner.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/test_utils
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests
copying test/run_tests__tests/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests
copying test/run_tests__tests/run_tests__test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/fake_2_test.py ->
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/print_stdout
copying test/run_tests__tests/print_stdout/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/print_stdout
copying test/run_tests__tests/print_stdout/fake_2_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/print_stdout
copying test/run_tests__tests/print_stdout/fake_3_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/print_stdout
copying test/run_tests__tests/print_stdout/fake_4_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/print_stdout
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
copying test/run_tests__tests/incomplete_todo/__init__.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
copying test/run_tests__tests/incomplete_todo/fake_2_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
copying test/run_tests__tests/incomplete_todo/fake_3_test.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/incomplete_todo
creating build/lib.macosx-10.6-x86_64-3.5/pygame/tests/run_tests__tests/exclude
copying test/run_tests__tests/exclude/__init__.py ->
copying examples/sound.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/sound_array_demos.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/stars.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/testsprite.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
copying examples/vgrade.py -> build/lib.macosx-10.6-x86_64-3.5/pygame/examples
running build_ext
building 'pygame.scrap' extension
creating build/temp.macosx-10.6-x86_64-3.5
creating build/temp.macosx-10.6-x86_64-3.5/src
/usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I//anaconda/include -arch x86_64 -DENABLE_NEWBUF=1 -I/NEED_INC_PATH_FIX -I//anaconda/include/python3.5m -c src/scrap.c -o build/temp.macosx-10.6-x86_64-3.5/src/scrap.o
src/scrap.c:27:10: fatal error: 'SDL.h' file not found
#include "SDL.h"
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Command "//anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/pip-build-2n_0kk3y/pygame/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/pip-yhcf0tlb-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/s0/514rk5j90q90x4s8n48ry7wc0000gn/T/pip-build-2n_0kk3y/pygame/
Yes, it's huge! I have cut out loads of lines like copying lib/... to fit inside the 30,000 character limit of SE.
I have tried the following:
pip install pygame
pip install pygame --no-cache-dir
pip install pygame --force-reinstall
pip install pygame --no-binary :all:
pip install pygame --no-use-wheel
They all gave basically the same error.
I can't work out what is wrong, as this is a brand new install of anaconda.
The lines:
#include "SDL.h"
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
are obviously the most important part, which implies a bug in the code. Is there an obvious error here? If it is a Python script, then it shouldn't be run, as it is commented out.
I've googled the error, and other people with a similar error like here needed to run xcode-select --install to solve it.
If I run that, I get this:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
So that is not my problem.
There is also the important line:
Running setup.py bdist_wheel for pygame ... error
Does anyone have any insights that might help me?
Just run this and you'll be able to work with the latest version of PyGame.
This command installs the missing dependencies that cause your error.
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
Then you can run pip install pygame and it will work fine.
The problem is in new XCode that shut down some support ( I got similar issue with wxPython ) but I managed to make pygame work (version 1.9.2) so try pip install pygame==1.9.2 since it is by default trying to get 1.9.3
Also the #include "SDL.h" is C++, not python, so it is not a comment, rather it is importing a library SDL :)
I'm trying to run the following code, to no avail. To my knowledge, there aren't any syntax errors.
import quandl
import pandas as pd
fifty_states =pd.read_html('https://simple.wikipedia.org/wiki/List_of_U.S._states')
print(fifty_states)
I'm getting the following error when I run this code:
Traceback (most recent call last):
File "C:/Users/Dave/Documents/Python Files/helloworld.py", line 15, in
fiddy_states = pd.read_html('http://simple.wikipedia.org/wiki/List_of_U.S._states')
File "C:\Python35\lib\site-packages\pandas\io\html.py", line 874, in read_html
parse_dates, tupleize_cols, thousands, attrs, encoding)
File "C:\Python35\lib\site-packages\pandas\io\html.py", line 726, in _parse
parser = _parser_dispatch(flav)
File "C:\Python35\lib\site-packages\pandas\io\html.py", line 685, in _parser_dispatch
raise ImportError("lxml not found, please install it")
ImportError: lxml not found, please install it
Not too sure why this is occurring, as I (should) have all the packages required to run this code. I have problems installing lxml and python3-lxml, as the packages fail to install. As a backup, I've installed the following:
python-dev libxml2-dev libxslt1-dev zlib1g-dev
in addition to 'html5lib', which I've read is a suitable replacement to lxml.
Not sure what else to do at this point, since searching for similar corrections (i.e. installing lxml) don't apply to me (I can't install lxml in any format via pip on the command line).
Any help is much appreciated.
Edit: It appears that lxml was never installed on my computer. It's weird, because I'm unable to install it via pip install lxml. Here're the error logs I get when attempting an install:
Collecting lxml
Using cached lxml-3.6.4.tar.gz
Building wheels for collected packages: lxml
Running setup.py bdist_wheel for lxml ... error
Complete output from command c:\python35\python.exe -u -c "import setuptools,
tokenize;__file__='C:\\Users\\Dwang\\AppData\\Local\\Temp\\pip-build-738bf61u\\l
xml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().rep
lace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\Dwang\AppData\Lo
cal\Temp\tmpm9z4yol6pip-wheel- --python-tag cp35:
Building lxml version 3.6.4.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,\r
\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\lxml
copying src\lxml\builder.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\cssselect.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\doctestcompare.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\ElementInclude.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\pyclasslookup.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\sax.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\usedoctest.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\_elementpath.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\__init__.py -> build\lib.win-amd64-3.5\lxml
creating build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\__init__.py -> build\lib.win-amd64-3.5\lxml\includes
creating build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\builder.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\clean.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\defs.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\diff.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\formfill.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\_diffcommand.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\_html5builder.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\_setmixin.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\__init__.py -> build\lib.win-amd64-3.5\lxml\html
creating build\lib.win-amd64-3.5\lxml\isoschematron
copying src\lxml\isoschematron\__init__.py -> build\lib.win-amd64-3.5\lxml\iso
schematron
copying src\lxml\lxml.etree.h -> build\lib.win-amd64-3.5\lxml
copying src\lxml\lxml.etree_api.h -> build\lib.win-amd64-3.5\lxml
copying src\lxml\includes\c14n.pxd -> build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\config.pxd -> build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\dtdvalid.pxd -> build\lib.win-amd64-3.5\lxml\include
s
copying src\lxml\includes\etreepublic.pxd -> build\lib.win-amd64-3.5\lxml\incl
udes
copying src\lxml\includes\htmlparser.pxd -> build\lib.win-amd64-3.5\lxml\inclu
des
copying src\lxml\includes\relaxng.pxd -> build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\schematron.pxd -> build\lib.win-amd64-3.5\lxml\inclu
des
copying src\lxml\includes\tree.pxd -> build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\uri.pxd -> build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\xinclude.pxd -> build\lib.win-amd64-3.5\lxml\include
s
copying src\lxml\includes\xmlerror.pxd -> build\lib.win-amd64-3.5\lxml\include
s
copying src\lxml\includes\xmlparser.pxd -> build\lib.win-amd64-3.5\lxml\includ
es
copying src\lxml\includes\xmlschema.pxd -> build\lib.win-amd64-3.5\lxml\includ
es
copying src\lxml\includes\xpath.pxd -> build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\xslt.pxd -> build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\etree_defs.h -> build\lib.win-amd64-3.5\lxml\include
s
copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-3.5\lxml\inclu
des
creating build\lib.win-amd64-3.5\lxml\isoschematron\resources
creating build\lib.win-amd64-3.5\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.w
in-amd64-3.5\lxml\isoschematron\resources\rng
creating build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win-a
md64-3.5\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win-a
md64-3.5\lxml\isoschematron\resources\xsl
creating build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-schematr
on-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract
_expand.xsl -> build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-sche
matron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_inc
lude.xsl -> build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-schemat
ron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematr
on_message.xsl -> build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-s
chematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematr
on_skeleton_for_xslt1.xsl -> build\lib.win-amd64-3.5\lxml\isoschematron\resource
s\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for
_xslt1.xsl -> build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-schem
atron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -
> build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
error: Unable to find vcvarsall.bat
----------------------------------------
Failed building wheel for lxml
Running setup.py clean for lxml
Failed to build lxml
Installing collected packages: lxml
Running setup.py install for lxml ... error
Complete output from command c:\python35\python.exe -u -c "import setuptools
, tokenize;__file__='C:\\Users\\Dwang\\AppData\\Local\\Temp\\pip-build-738bf61u\
\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().r
eplace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Dwang\AppDat
a\Local\Temp\pip-4_tf2u3a-record\install-record.txt --single-version-externally-
managed --compile:
Building lxml version 3.6.4.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,
\r\noperable program or batch file.\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.5
creating build\lib.win-amd64-3.5\lxml
copying src\lxml\builder.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\cssselect.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\doctestcompare.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\ElementInclude.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\pyclasslookup.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\sax.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\usedoctest.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\_elementpath.py -> build\lib.win-amd64-3.5\lxml
copying src\lxml\__init__.py -> build\lib.win-amd64-3.5\lxml
creating build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\__init__.py -> build\lib.win-amd64-3.5\lxml\includ
es
creating build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\builder.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\clean.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\defs.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\diff.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\formfill.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\_diffcommand.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\_html5builder.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\_setmixin.py -> build\lib.win-amd64-3.5\lxml\html
copying src\lxml\html\__init__.py -> build\lib.win-amd64-3.5\lxml\html
creating build\lib.win-amd64-3.5\lxml\isoschematron
copying src\lxml\isoschematron\__init__.py -> build\lib.win-amd64-3.5\lxml\i
soschematron
copying src\lxml\lxml.etree.h -> build\lib.win-amd64-3.5\lxml
copying src\lxml\lxml.etree_api.h -> build\lib.win-amd64-3.5\lxml
copying src\lxml\includes\c14n.pxd -> build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\config.pxd -> build\lib.win-amd64-3.5\lxml\include
s
copying src\lxml\includes\dtdvalid.pxd -> build\lib.win-amd64-3.5\lxml\inclu
des
copying src\lxml\includes\etreepublic.pxd -> build\lib.win-amd64-3.5\lxml\in
cludes
copying src\lxml\includes\htmlparser.pxd -> build\lib.win-amd64-3.5\lxml\inc
ludes
copying src\lxml\includes\relaxng.pxd -> build\lib.win-amd64-3.5\lxml\includ
es
copying src\lxml\includes\schematron.pxd -> build\lib.win-amd64-3.5\lxml\inc
ludes
copying src\lxml\includes\tree.pxd -> build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\uri.pxd -> build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\xinclude.pxd -> build\lib.win-amd64-3.5\lxml\inclu
des
copying src\lxml\includes\xmlerror.pxd -> build\lib.win-amd64-3.5\lxml\inclu
des
copying src\lxml\includes\xmlparser.pxd -> build\lib.win-amd64-3.5\lxml\incl
udes
copying src\lxml\includes\xmlschema.pxd -> build\lib.win-amd64-3.5\lxml\incl
udes
copying src\lxml\includes\xpath.pxd -> build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\xslt.pxd -> build\lib.win-amd64-3.5\lxml\includes
copying src\lxml\includes\etree_defs.h -> build\lib.win-amd64-3.5\lxml\inclu
des
copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-3.5\lxml\inc
ludes
creating build\lib.win-amd64-3.5\lxml\isoschematron\resources
creating build\lib.win-amd64-3.5\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib
.win-amd64-3.5\lxml\isoschematron\resources\rng
creating build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win
-amd64-3.5\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win
-amd64-3.5\lxml\isoschematron\resources\xsl
creating build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-schema
tron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstra
ct_expand.xsl -> build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-sc
hematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_i
nclude.xsl -> build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-schem
atron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schema
tron_message.xsl -> build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso
-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schema
tron_skeleton_for_xslt1.xsl -> build\lib.win-amd64-3.5\lxml\isoschematron\resour
ces\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_f
or_xslt1.xsl -> build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-sch
ematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt
-> build\lib.win-amd64-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt
1
running build_ext
building 'lxml.etree' extension
error: Unable to find vcvarsall.bat
----------------------------------------
Command "c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\
\Users\\Dwang\\AppData\\Local\\Temp\\pip-build-738bf61u\\lxml\\setup.py';exec(co
mpile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __
file__, 'exec'))" install --record C:\Users\Dwang\AppData\Local\Temp\pip-4_tf2u3
a-record\install-record.txt --single-version-externally-managed --compile" faile
d with error code 1 in C:\Users\Dwang\AppData\Local\Temp\pip-build-738bf61u\lxml
\
From what I understand and according to the docs, if read_html() fails to use lxml, it should fall back to html5lib, but it looks ike it does not happen in your case and an error is thrown.
Try to explicitly state the flavor:
fifty_states = pd.read_html('https://simple.wikipedia.org/wiki/List_of_U.S._states', flavor='html5lib`)
Try
$ conda install -c conda-forge lxml
I had the same problem with the latest version (as of writing) of both pandas and lxml in my conda environment.
verified by:
conda list | findstr lxml
conda list | findstr pandas
(findstr is windows version of grep)
when I restarted the jupyterkernel after reinstalling the packages I could still not get pd.read_html() to work but strangely it would allow me to pass a string to be parsed instead of a url with no complaints. So i ran:
import subprocess
import pandas as pd
s = subprocess.check_output("curl https://www.myurl.com/page.html")
df = pd.read_html(io=s)
I have no idea why that would be any different from just allowing pandas to fetch the page but it worked so I figured I would share it here :)
I had the same problem and while the answers above, gave me clarity. It did not fix my problem. The reason my problem existed was because as of this writing, I was unable to install pandas via pip3 it would take a minimum of 30 minutes just to install so I had to find a more workable solution: Here are my steps that I took.
Panda install from the official pandas site vi apt-get (in my case on ubuntu) - https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html sudo apt-get install python3-pandas
I used a virtualenv via a pip3 install virtualenv, activated the virtualenv: source ~/venv/bin/activate. However inside the virtualenv pandas, numpy, lxml, and html5lib. Could not be seen, my solution to fix this problem is in steps 3.
(MOST IMPORTANT PART) Create a symbolic link for each import you cannot see in your virtual venv. In my case I used the following commands for each of the packages.
ln -s /usr/lib/python3/dist-packages/pandas ~/venv/lib/python3.8/site-packages/
ln -s /usr/lib/python3/dist-packages/numpy ~/venv/lib/python3.8/site-packages/
ln -s /usr/lib/python3/dist-packages/lxml ~/venv/lib/python3.8/site-packages/
ln -s /usr/lib/python3/dist-packages/html5lib ~/venv/lib/python3.8/site-packages/
I hope this helps someone as much as it did me! :-)
When I try to install lxml, I get the following. I've tried downloading C++ redists and a whole bunch of other things I've found, but nothing works.
I've tried everything from the following link:
How to install lxml on Windows
I've got python version 3.5.1. I
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\daniel.bak>pip install setuptools
Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\users\daniel.bak\appdata\local\programs\python\python35-32\lib\site-packages
C:\Users\daniel.bak>pip install lxml
Collecting lxml
Using cached lxml-3.6.0.tar.gz
Installing collected packages: lxml
Running setup.py install for lxml ... error
Complete output from command c:\users\daniel.bak\appdata\local\programs\python\python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\daniel.bak\\AppData\\Local\\Temp\\pip-build-_d7bp49n\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replac
e('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\daniel.bak\AppData\Local\Temp\pip-4wmqb1li-record\install-record.txt --single-version-externally-managed --compile:
Building lxml version 3.6.0.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\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.win32-3.5
creating build\lib.win32-3.5\lxml
copying src\lxml\builder.py -> build\lib.win32-3.5\lxml
copying src\lxml\cssselect.py -> build\lib.win32-3.5\lxml
copying src\lxml\doctestcompare.py -> build\lib.win32-3.5\lxml
copying src\lxml\ElementInclude.py -> build\lib.win32-3.5\lxml
copying src\lxml\pyclasslookup.py -> build\lib.win32-3.5\lxml
copying src\lxml\sax.py -> build\lib.win32-3.5\lxml
copying src\lxml\usedoctest.py -> build\lib.win32-3.5\lxml
copying src\lxml\_elementpath.py -> build\lib.win32-3.5\lxml
copying src\lxml\__init__.py -> build\lib.win32-3.5\lxml
creating build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\__init__.py -> build\lib.win32-3.5\lxml\includes
creating build\lib.win32-3.5\lxml\html
copying src\lxml\html\builder.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\clean.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\defs.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\diff.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\formfill.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\_diffcommand.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\_html5builder.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\_setmixin.py -> build\lib.win32-3.5\lxml\html
copying src\lxml\html\__init__.py -> build\lib.win32-3.5\lxml\html
creating build\lib.win32-3.5\lxml\isoschematron
copying src\lxml\isoschematron\__init__.py -> build\lib.win32-3.5\lxml\isoschematron
copying src\lxml\lxml.etree.h -> build\lib.win32-3.5\lxml
copying src\lxml\lxml.etree_api.h -> build\lib.win32-3.5\lxml
copying src\lxml\includes\c14n.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\config.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\dtdvalid.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\etreepublic.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\htmlparser.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\relaxng.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\schematron.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\tree.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\uri.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\xinclude.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\xmlerror.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\xmlparser.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\xmlschema.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\xpath.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\xslt.pxd -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\etree_defs.h -> build\lib.win32-3.5\lxml\includes
copying src\lxml\includes\lxml-version.h -> build\lib.win32-3.5\lxml\includes
creating build\lib.win32-3.5\lxml\isoschematron\resources
creating build\lib.win32-3.5\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win32-3.5\lxml\isoschematron\resources\rng
creating build\lib.win32-3.5\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl
creating build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win32-3.5\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
error: Unable to find vcvarsall.bat
----------------------------------------
Command "c:\users\daniel.bak\appdata\local\programs\python\python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\daniel.bak\\AppData\\Local\\Temp\\pip-build-_d7bp49n\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file_
_, 'exec'))" install --record C:\Users\daniel.bak\AppData\Local\Temp\pip-4wmqb1li-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\daniel.bak\AppData\Local\Temp\pip-build-_d7bp49n\lxml\
Installing the precompiled binaries gives me:
C:\Users\daniel.bak>pip install "C:\Users\daniel.bak\Downloads\lxml-3.6.0-cp35-cp35m-win_amd64.whl"
lxml-3.6.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.
You can download precompiled binaries and install them with pip install
Here is the download link. cp27, cp34, cp35 indicate Python versions and win32 and win_amd64 32 and 64 bit packages.
I was having trouble installing lxml on my system as well along with urllib. I do not remember why but lxml was not available for python 3.5, urllib itself is not available but instead it is available as urllib.requests and another package that I do not remember. For me the best solution was to install anaconda instead. Anaconda has just so many libraries and it works greatly in place of python. It has the whole url library and a comprehension of several other libraries.