Why Installation of Cryptography python package is failing? - python

I am trying to install a package Cryptography in Python but each time I try it's failing with error.Command I used to install this package is: pip install cryptography==2.8 Error I'm getting is as follows:
Collecting cryptography==2.8
Using cached cryptography-2.8.tar.gz (504 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: cffi!=1.11.3,>=1.8 in c:\users\abcd\appdata\local\programs\python\python39\lib\site-packages (from cryptography==2.8) (1.14.5)
Requirement already satisfied: six>=1.4.1 in c:\users\abcd\appdata\local\programs\python\python39\lib\site-packages (from cryptography==2.8) (1.15.0)
Requirement already satisfied: pycparser in c:\users\abcd\appdata\local\programs\python\python39\lib\site-packages (from cffi!=1.11.3,>=1.8->cryptography==2.8) (2.20)
Building wheels for collected packages: cryptography
Building wheel for cryptography (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\abcd\appdata\local\programs\python\python39\python.exe' 'c:\users\abcd\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\abcd\AppData\Local\Temp\tmply9tk3q1'
cwd: C:\Users\abcd\AppData\Local\Temp\pip-install-hespmf8p\cryptography_59cf671691e246028ecf9a6a37f5e88c
Complete output (137 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\cryptography
copying src\cryptography\exceptions.py -> build\lib.win-amd64-3.9\cryptography
copying src\cryptography\fernet.py -> build\lib.win-amd64-3.9\cryptography
copying src\cryptography\utils.py -> build\lib.win-amd64-3.9\cryptography
copying src\cryptography\__about__.py -> build\lib.win-amd64-3.9\cryptography
copying src\cryptography\__init__.py -> build\lib.win-amd64-3.9\cryptography
creating build\lib.win-amd64-3.9\cryptography\hazmat
copying src\cryptography\hazmat\_der.py -> build\lib.win-amd64-3.9\cryptography\hazmat
copying src\cryptography\hazmat\_oid.py -> build\lib.win-amd64-3.9\cryptography\hazmat
copying src\cryptography\hazmat\__init__.py -> build\lib.win-amd64-3.9\cryptography\hazmat
creating build\lib.win-amd64-3.9\cryptography\x509
copying src\cryptography\x509\base.py -> build\lib.win-amd64-3.9\cryptography\x509
copying src\cryptography\x509\certificate_transparency.py -> build\lib.win-amd64-3.9\cryptography\x509
copying src\cryptography\x509\extensions.py -> build\lib.win-amd64-3.9\cryptography\x509
copying src\cryptography\x509\general_name.py -> build\lib.win-amd64-3.9\cryptography\x509
copying src\cryptography\x509\name.py -> build\lib.win-amd64-3.9\cryptography\x509
copying src\cryptography\x509\ocsp.py -> build\lib.win-amd64-3.9\cryptography\x509
copying src\cryptography\x509\oid.py -> build\lib.win-amd64-3.9\cryptography\x509
copying src\cryptography\x509\__init__.py -> build\lib.win-amd64-3.9\cryptography\x509
creating build\lib.win-amd64-3.9\cryptography\hazmat\backends
copying src\cryptography\hazmat\backends\interfaces.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends
copying src\cryptography\hazmat\backends\__init__.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends
creating build\lib.win-amd64-3.9\cryptography\hazmat\bindings
copying src\cryptography\hazmat\bindings\__init__.py -> build\lib.win-amd64-3.9\cryptography\hazmat\bindings
creating build\lib.win-amd64-3.9\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\cmac.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\constant_time.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\hashes.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\hmac.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\keywrap.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\padding.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\poly1305.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\__init__.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives
creating build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\aead.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\backend.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ciphers.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\cmac.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\decode_asn1.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\dh.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\dsa.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ec.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ed25519.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ed448.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\encode_asn1.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\hashes.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\hmac.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ocsp.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\poly1305.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\rsa.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\utils.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\x25519.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\x448.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\x509.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\__init__.py -> build\lib.win-amd64-3.9\cryptography\hazmat\backends\openssl
creating build\lib.win-amd64-3.9\cryptography\hazmat\bindings\openssl
copying src\cryptography\hazmat\bindings\openssl\binding.py -> build\lib.win-amd64-3.9\cryptography\hazmat\bindings\openssl
copying src\cryptography\hazmat\bindings\openssl\_conditional.py -> build\lib.win-amd64-3.9\cryptography\hazmat\bindings\openssl
copying src\cryptography\hazmat\bindings\openssl\__init__.py -> build\lib.win-amd64-3.9\cryptography\hazmat\bindings\openssl
creating build\lib.win-amd64-3.9\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\dh.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\dsa.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\ec.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\ed25519.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\ed448.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\padding.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\rsa.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\utils.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\x25519.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\x448.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\__init__.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\asymmetric
creating build\lib.win-amd64-3.9\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\aead.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\algorithms.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\base.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\modes.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\__init__.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\ciphers
creating build\lib.win-amd64-3.9\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\concatkdf.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\hkdf.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\kbkdf.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\pbkdf2.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\scrypt.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\x963kdf.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\__init__.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\kdf
creating build\lib.win-amd64-3.9\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization\base.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization\pkcs12.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization\ssh.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization\__init__.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\serialization
creating build\lib.win-amd64-3.9\cryptography\hazmat\primitives\twofactor
copying src\cryptography\hazmat\primitives\twofactor\hotp.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\twofactor
copying src\cryptography\hazmat\primitives\twofactor\totp.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\twofactor
copying src\cryptography\hazmat\primitives\twofactor\utils.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\twofactor
copying src\cryptography\hazmat\primitives\twofactor\__init__.py -> build\lib.win-amd64-3.9\cryptography\hazmat\primitives\twofactor
running egg_info
writing src\cryptography.egg-info\PKG-INFO
writing dependency_links to src\cryptography.egg-info\dependency_links.txt
writing requirements to src\cryptography.egg-info\requires.txt
writing top-level names to src\cryptography.egg-info\top_level.txt
reading manifest file 'src\cryptography.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs\_build'
warning: no previously-included files found matching 'vectors'
warning: no previously-included files matching '*' found under directory 'vectors'
warning: no previously-included files found matching 'azure-pipelines.yml'
warning: no previously-included files found matching '.azure-pipelines'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files matching '*' found under directory '.azure-pipelines'
warning: no previously-included files matching '*' found under directory '.travis'
warning: no previously-included files found matching 'release.py'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching 'dev-requirements.txt'
warning: no previously-included files found matching 'rtd-requirements.txt'
warning: no previously-included files found matching 'tox.ini'
writing manifest file 'src\cryptography.egg-info\SOURCES.txt'
running build_ext
generating cffi module 'build\\temp.win-amd64-3.9\\Release\\_padding.c'
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
generating cffi module 'build\\temp.win-amd64-3.9\\Release\\_constant_time.c'
generating cffi module 'build\\temp.win-amd64-3.9\\Release\\_openssl.c'
building '_openssl' extension
creating build\temp.win-amd64-3.9\Release\build
creating build\temp.win-amd64-3.9\Release\build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release\build\temp.win-amd64-3.9\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\abcd\appdata\local\programs\python\python39\include -Ic:\users\abcd\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29910\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29910\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcbuild\temp.win-amd64-3.9\Release\_openssl.c /Fobuild\temp.win-amd64-3.9\Release\build\temp.win-amd64-3.9\Release\_openssl.obj
_openssl.c
build\temp.win-amd64-3.9\Release\_openssl.c(575): fatal error C1083: Cannot open include file: 'openssl/opensslv.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
Not sure what could be the wrong here. Earlier I had got Something related to Wheely package and so I installed that package and there after it's throwing this error.
I am new to Python and I am from .Net background, so facing difficulties dealing with Python packages.
Any help is appreciated. I even tried to install OpenSSL but it seems to be of no use or I am missing something here.

cryptography ships binary wheels on Windows so that users don't need to compile, but the version you are attempting to install (2.8) does not have a wheel that works for Python 3.9. If you can use a newer version then this will resolve the problem (although also be sure you upgrade to the latest pip!).

Related

Running setup.py install for lxml did not run successfully [duplicate]

"PS D:\Complete-Python-3-Bootcamp-master\12-Advanced Python Modules\puzzle_unzip> pip install lxml
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
╰─> [96 lines of output]
Building lxml version 4.9.1.
Building without Cython.
Building against pre-built libxml2 andl libxslt libraries
running install
C:\Users\lohar\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
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\src
creating build\temp.win-amd64-cpython-311\Release\src\lxml
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc\lxml\includes -IC:\Users\lohar\AppData\Local\Programs\Python\Python311\include -IC:\Users\lohar\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /Tcsrc\lxml\etree.c /Fobuild\temp.win-amd64-cpython-311\Release\src\lxml\etree.obj -w
cl : Command line warning D9025 : overriding '/W3' with '/w'
etree.c
C:\Users\lohar\AppData\Local\Temp\pip-install-v8_cypj7\lxml_b1e7951ab83046e384fffcd4610d3736\src\lxml\includes/etree_defs.h(14): fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory
Compile failed: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
creating Users
creating Users\lohar
creating Users\lohar\AppData
creating Users\lohar\AppData\Local
creating Users\lohar\AppData\Local\Temp
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /TcC:\Users\lohar\AppData\Local\Temp\xmlXPathInituop21067.c /FoUsers\lohar\AppData\Local\Temp\xmlXPathInituop21067.obj
xmlXPathInituop21067.c
C:\Users\lohar\AppData\Local\Temp\xmlXPathInituop21067.c(1): fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
[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.
PS D:\Complete-Python-3-Bootcamp-master\12-Advanced Python Modules\puzzle_unzip> "
im trying to install lxml library by pip install lxml.
i also installed vs build tools 2022 .
after that i stuck on this error i tryed multiple things but they dont work
thigs that i tried manually installing packages.
multiple internet solutions
im expecting a solution to install lxml on W11 machine.and also im using vs code and pycharm python version 3.11 and pip version 22.3.1
The Python lxml module is a language-binding / wrapper for two C libraries.
For Windows they provide binary builds that include these libraries. Otherwise it will be pain and suffering getting it installed and running on Windows. Because it's Windows. "Developers, developers, developers".. (As lxml developers put it: "users of that platform usually fail to build lxml themselves")
Normally you should get the binary distribution when doing install through pip but in this case you don't.
Try to pin an older version, maybe binaries are available for it:
pip install lxml==4.9.0
Try to download the lxml binary distribution by Christoph Gohlke available here.
You can install the wheel file also via pip.
Sources:
Where are the binary builds?
Source builds on MS Windows

pip install lxml error: Building wheel for lxml (setup.py) ... error ; error: subprocess-exited-with-error [duplicate]

"PS D:\Complete-Python-3-Bootcamp-master\12-Advanced Python Modules\puzzle_unzip> pip install lxml
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
╰─> [96 lines of output]
Building lxml version 4.9.1.
Building without Cython.
Building against pre-built libxml2 andl libxslt libraries
running install
C:\Users\lohar\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
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\src
creating build\temp.win-amd64-cpython-311\Release\src\lxml
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc\lxml\includes -IC:\Users\lohar\AppData\Local\Programs\Python\Python311\include -IC:\Users\lohar\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /Tcsrc\lxml\etree.c /Fobuild\temp.win-amd64-cpython-311\Release\src\lxml\etree.obj -w
cl : Command line warning D9025 : overriding '/W3' with '/w'
etree.c
C:\Users\lohar\AppData\Local\Temp\pip-install-v8_cypj7\lxml_b1e7951ab83046e384fffcd4610d3736\src\lxml\includes/etree_defs.h(14): fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory
Compile failed: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
creating Users
creating Users\lohar
creating Users\lohar\AppData
creating Users\lohar\AppData\Local
creating Users\lohar\AppData\Local\Temp
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /TcC:\Users\lohar\AppData\Local\Temp\xmlXPathInituop21067.c /FoUsers\lohar\AppData\Local\Temp\xmlXPathInituop21067.obj
xmlXPathInituop21067.c
C:\Users\lohar\AppData\Local\Temp\xmlXPathInituop21067.c(1): fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
[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.
PS D:\Complete-Python-3-Bootcamp-master\12-Advanced Python Modules\puzzle_unzip> "
im trying to install lxml library by pip install lxml.
i also installed vs build tools 2022 .
after that i stuck on this error i tryed multiple things but they dont work
thigs that i tried manually installing packages.
multiple internet solutions
im expecting a solution to install lxml on W11 machine.and also im using vs code and pycharm python version 3.11 and pip version 22.3.1
The Python lxml module is a language-binding / wrapper for two C libraries.
For Windows they provide binary builds that include these libraries. Otherwise it will be pain and suffering getting it installed and running on Windows. Because it's Windows. "Developers, developers, developers".. (As lxml developers put it: "users of that platform usually fail to build lxml themselves")
Normally you should get the binary distribution when doing install through pip but in this case you don't.
Try to pin an older version, maybe binaries are available for it:
pip install lxml==4.9.0
Try to download the lxml binary distribution by Christoph Gohlke available here.
You can install the wheel file also via pip.
Sources:
Where are the binary builds?
Source builds on MS Windows

How do I install pandas datareader on windows when hit with this error?

I am trying to install pandas datareader, but I am hit with this error:
Collecting pandas-datareader
Using cached pandas_datareader-0.10.0-py3-none-any.whl (109 kB)
Collecting lxml
Using cached lxml-4.9.1.tar.gz (3.4 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pandas>=0.23 in c:\users\marcu\appdata\local\programs\python\python311\lib\site-packages (from pandas-datareader) (1.5.2)
Requirement already satisfied: requests>=2.19.0 in c:\users\marcu\appdata\local\programs\python\python311\lib\site-packages (from pandas-datareader) (2.28.1)
Requirement already satisfied: python-dateutil>=2.8.1 in c:\users\marcu\appdata\local\programs\python\python311\lib\site-packages (from pandas>=0.23->pandas-datareader) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in c:\users\marcu\appdata\local\programs\python\python311\lib\site-packages (from pandas>=0.23->pandas-datareader) (2022.6)
Requirement already satisfied: numpy>=1.21.0 in c:\users\marcu\appdata\local\programs\python\python311\lib\site-packages (from pandas>=0.23->pandas-datareader) (1.23.5)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\marcu\appdata\local\programs\python\python311\lib\site-packages (from requests>=2.19.0->pandas-datareader) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in c:\users\marcu\appdata\local\programs\python\python311\lib\site-packages (from requests>=2.19.0->pandas-datareader) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\marcu\appdata\local\programs\python\python311\lib\site-packages (from requests>=2.19.0->pandas-datareader) (1.26.13)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\marcu\appdata\local\programs\python\python311\lib\site-packages (from requests>=2.19.0->pandas-datareader) (2022.9.24)
Requirement already satisfied: six>=1.5 in c:\users\marcu\appdata\local\programs\python\python311\lib\site-packages (from python-dateutil>=2.8.1->pandas>=0.23->pandas-datareader) (1.16.0)
Installing collected packages: lxml, pandas-datareader
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
╰─> [96 lines of output]
Building lxml version 4.9.1.
Building without Cython.
Building against pre-built libxml2 andl libxslt libraries
running install
C:\Users\marcu\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
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\src
creating build\temp.win-amd64-cpython-311\Release\src\lxml
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc\lxml\includes -IC:\Users\marcu\AppData\Local\Programs\Python\Python311\include -IC:\Users\marcu\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc\lxml\etree.c /Fobuild\temp.win-amd64-cpython-311\Release\src\lxml\etree.obj -w
cl : Command line warning D9025 : overriding '/W3' with '/w'
etree.c
C:\Users\marcu\AppData\Local\Programs\Python\Python311\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
Compile failed: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.32.31326\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
creating Users
creating Users\marcu
creating Users\marcu\AppData
creating Users\marcu\AppData\Local
creating Users\marcu\AppData\Local\Temp
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcC:\Users\marcu\AppData\Local\Temp\xmlXPathInit65mzfy1g.c /FoUsers\marcu\AppData\Local\Temp\xmlXPathInit65mzfy1g.obj
xmlXPathInit65mzfy1g.c
C:\Users\marcu\AppData\Local\Temp\xmlXPathInit65mzfy1g.c(1): fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.32.31326\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
[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 am using python 3.11.0, and the command I am using to install pandas datareader is "pip install pandas-datareader" Thanks for the help!
It looks like your post is mostly code; please add some more details.
It looks like your post is mostly code; please add some more details.
It looks like your post is mostly code; please add some more details.
try:
pip install --upgrade pip
On Windows the recommended command is:
python -m pip install --upgrade pip
You're almost there. Check the error logs carefully. You'll notice it's asking for:
Is libxml2 installed?
Try installing that with pip then retry.

Legacy install failure - error while installing greenlet on python 3.9.10

I'm trying to install sqlalchemy, which requires the package greenlet to be installed. Can someone tell me what is producing the error?
I'm using Pycharm with venv environment, I have tried installing it with --force command but it gives the same error.
The pip version is 22.0.4, if I try installing it on pip version 21.3.1, it generates a different error log
My wheel is already up to date
Here's the error report =>
Collecting greenlet
Downloading greenlet-1.1.2.tar.gz (91 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 91.2/91.2 KB 5.1 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Building wheels for collected packages: greenlet
Building wheel for greenlet (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [72 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.mingw_x86_64-cpython-39
creating build\lib.mingw_x86_64-cpython-39\greenlet
copying src\greenlet\__init__.py -> build\lib.mingw_x86_64-cpython-39\greenlet
creating build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_contextvars.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_cpp.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_extension_interface.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_gc.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_generator.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_generator_nested.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_greenlet.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_leaks.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_stack_saved.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_throw.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_tracing.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_version.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_weakref.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\__init__.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
running egg_info
writing src\greenlet.egg-info\PKG-INFO
writing dependency_links to src\greenlet.egg-info\dependency_links.txt
writing requirements to src\greenlet.egg-info\requires.txt
writing top-level names to src\greenlet.egg-info\top_level.txt
reading manifest file 'src\greenlet.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs\_build'
warning: no files found matching '*.py' under directory 'appveyor'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '.coverage' found anywhere in distribution
adding license file 'LICENSE'
adding license file 'LICENSE.PSF'
adding license file 'AUTHORS'
writing manifest file 'src\greenlet.egg-info\SOURCES.txt'
copying src\greenlet\greenlet.c -> build\lib.mingw_x86_64-cpython-39\greenlet
copying src\greenlet\greenlet.h -> build\lib.mingw_x86_64-cpython-39\greenlet
copying src\greenlet\slp_platformselect.h -> build\lib.mingw_x86_64-cpython-39\greenlet
creating build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\setup_switch_x64_masm.cmd -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_aarch64_gcc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_alpha_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_amd64_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_arm32_gcc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_arm32_ios.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_csky_gcc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_m68k_gcc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_mips_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_ppc64_aix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_ppc64_linux.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_ppc_aix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_ppc_linux.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_ppc_macosx.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_ppc_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_riscv_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_s390_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_sparc_sun_gcc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_x32_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_x64_masm.asm -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_x64_masm.obj -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_x64_msvc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_x86_msvc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_x86_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\tests\_test_extension.c -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\_test_extension_cpp.cpp -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
running build_ext
building 'greenlet._greenlet' 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 greenlet
Running setup.py clean for greenlet
Failed to build greenlet
Installing collected packages: greenlet
Running setup.py install for greenlet ... error
error: subprocess-exited-with-error
× Running setup.py install for greenlet did not run successfully.
│ exit code: 1
╰─> [74 lines of output]
running install
E:\Programming\flaskCRUD\venv\lib\python3.9\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and ot
her standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.mingw_x86_64-cpython-39
creating build\lib.mingw_x86_64-cpython-39\greenlet
copying src\greenlet\__init__.py -> build\lib.mingw_x86_64-cpython-39\greenlet
creating build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_contextvars.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_cpp.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_extension_interface.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_gc.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_generator.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_generator_nested.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_greenlet.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_leaks.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_stack_saved.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_throw.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_tracing.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_version.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\test_weakref.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\__init__.py -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
running egg_info
writing src\greenlet.egg-info\PKG-INFO
writing dependency_links to src\greenlet.egg-info\dependency_links.txt
writing requirements to src\greenlet.egg-info\requires.txt
writing top-level names to src\greenlet.egg-info\top_level.txt
reading manifest file 'src\greenlet.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs\_build'
warning: no files found matching '*.py' under directory 'appveyor'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '.coverage' found anywhere in distribution
adding license file 'LICENSE'
adding license file 'LICENSE.PSF'
adding license file 'AUTHORS'
writing manifest file 'src\greenlet.egg-info\SOURCES.txt'
copying src\greenlet\greenlet.c -> build\lib.mingw_x86_64-cpython-39\greenlet
copying src\greenlet\greenlet.h -> build\lib.mingw_x86_64-cpython-39\greenlet
copying src\greenlet\slp_platformselect.h -> build\lib.mingw_x86_64-cpython-39\greenlet
creating build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\setup_switch_x64_masm.cmd -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_aarch64_gcc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_alpha_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_amd64_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_arm32_gcc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_arm32_ios.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_csky_gcc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_m68k_gcc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_mips_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_ppc64_aix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_ppc64_linux.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_ppc_aix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_ppc_linux.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_ppc_macosx.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_ppc_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_riscv_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_s390_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_sparc_sun_gcc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_x32_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_x64_masm.asm -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_x64_masm.obj -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_x64_msvc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_x86_msvc.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\platform\switch_x86_unix.h -> build\lib.mingw_x86_64-cpython-39\greenlet\platform
copying src\greenlet\tests\_test_extension.c -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
copying src\greenlet\tests\_test_extension_cpp.cpp -> build\lib.mingw_x86_64-cpython-39\greenlet\tests
running build_ext
building 'greenlet._greenlet' 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.
╰─> greenlet
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Can't install python cryptography on Cygwin

I have installed python38-cryptogrpahy package v.3.3.2-1 thru cygwin but when I try to install fabric via pip - it tries to build it and fails with next error:
$ pip install -r ./requirements.txt
Collecting fabric3
Using cached Fabric3-1.14.post1-py3-none-any.whl (92 kB)
Collecting paramiko<3.0,>=2.0
Using cached paramiko-2.8.1-py2.py3-none-any.whl (206 kB)
Requirement already satisfied: six>=1.10.0 in ./env/lib/python3.8/site-packages (from fabric3->-r ./requirements.txt (line 1)) (1.16.0)
Collecting pynacl>=1.0.1
Using cached PyNaCl-1.4.0-cp38-cp38-cygwin_3_3_3_x86_64.whl
Collecting bcrypt>=3.1.3
Using cached bcrypt-3.2.0-cp38-cp38-cygwin_3_3_3_x86_64.whl
Collecting cryptography>=2.5
Using cached cryptography-36.0.1.tar.gz (572 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting cffi>=1.1
Using cached cffi-1.15.0-cp38-cp38-cygwin_3_3_3_x86_64.whl
Requirement already satisfied: pycparser in ./env/lib/python3.8/site-packages (from cffi>=1.1->bcrypt>=3.1.3->paramiko<3.0,>=2.0->fabric3->-r ./requirements.txt (line 1)) (2.21)
Building wheels for collected packages: cryptography
Building wheel for cryptography (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: /home/dnester/repo/vastuf_server_common/containers/smart_home/rvalarm/env/bin/python /home/dnester/repo/vastuf_server_common/containers/smart_home/rvalarm/env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpojt6ejpa
cwd: /tmp/pip-install-cxk1g2b2/cryptography_9e2405fed34048fcbe4e2c9e871e31b6
Complete output (168 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.cygwin-3.3.3-x86_64-3.8
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography
copying src/cryptography/exceptions.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography
copying src/cryptography/fernet.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography
copying src/cryptography/utils.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography
copying src/cryptography/__about__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography
copying src/cryptography/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat
copying src/cryptography/hazmat/_oid.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat
copying src/cryptography/hazmat/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/base.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/certificate_transparency.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/extensions.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/general_name.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/name.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/ocsp.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/oid.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/x509
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/bindings
copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/bindings
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/padding.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_asymmetric.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_cipheralgorithm.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_serialization.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/backends/openssl
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/bindings/openssl
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/types.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/ciphers
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/kdf
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/serialization
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/primitives/twofactor
running egg_info
writing src/cryptography.egg-info/PKG-INFO
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing requirements to src/cryptography.egg-info/requires.txt
writing top-level names to src/cryptography.egg-info/top_level.txt
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files found matching 'vectors'
warning: no previously-included files matching '*' found under directory 'vectors'
warning: no previously-included files matching '*' found under directory '.github'
warning: no previously-included files found matching 'release.py'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'dev-requirements.txt'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'mypy.ini'
warning: no previously-included files matching '*' found under directory '.zuul.d'
warning: no previously-included files matching '*' found under directory '.zuul.playbooks'
adding license file 'LICENSE'
adding license file 'LICENSE.APACHE'
adding license file 'LICENSE.BSD'
adding license file 'LICENSE.PSF'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
copying src/cryptography/py.typed -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography
creating build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/__init__.pyi -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/asn1.pyi -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/ocsp.pyi -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/x509.pyi -> build/lib.cygwin-3.3.3-x86_64-3.8/cryptography/hazmat/bindings/_rust
running build_ext
running build_rust
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation/ for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq/
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation/#rust
Python: 3.8.12
platform: CYGWIN_NT-10.0-22000-3.3.3-341.x86_64-x86_64-64bit-WindowsPE
pip: n/a
setuptools: 59.7.0
setuptools_rust: 1.1.2
=============================DEBUG ASSISTANCE=============================
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
This package requires Rust >=1.41.0.
----------------------------------------
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects
I didn't find Rust compiler in Cygwin packages and don't want to build it from sources. So I want to figure out why installed cryptography package is not recognized by pip.
3.3.2 is the last cryptography version that does not require rust. So the last possible and available on Cygwin that has no rust compiler.
As it seems that pip is trying to install the latest upstream release of cryptography, forcing the cryptography==3.3.2 on the requirement should work.
Try to upgrade pip: python -m pip install --upgrade pip

Categories