I'm using python 2.7 on Windows. How come the following error occurs when I try to install [lxml][1] using [setuptools][2]'s easy_install?
C:\>easy_install lxml
Searching for lxml
Reading http://pypi.python.org/simple/lxml/
Reading http://codespeak.net/lxml
Best match: lxml 2.3.3
Downloading http://lxml.de/files/lxml-2.3.3.tgz
Processing lxml-2.3.3.tgz
Running lxml-2.3.3\setup.py -q bdist_egg --dist-dir c:\users\my_user\appdata\local\temp\easy_install-mtrdj2\lxml-2.3.3\egg-dist-tmp-tq8rx4
Building lxml version 2.3.3.
Building without Cython.
ERROR: 'xslt-config' is not recognized as an internal or external command,
operable program or batch file.
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
warning: no files found matching 'lxml.etree.c' under directory 'src\lxml'
warning: no files found matching 'lxml.objectify.c' under directory 'src\lxml'
warning: no files found matching 'lxml.etree.h' under directory 'src\lxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'src\lxml'
warning: no files found matching 'etree_defs.h' under directory 'src\lxml'
warning: no files found matching 'pubkey.asc' under directory 'doc'
warning: no files found matching 'tagpython*.png' under directory 'doc'
warning: no files found matching 'Makefile' under directory 'doc'
error: Setup script exited with error: Unable to find vcvarsall.bat
Downloading the package and running setup.py install also doesn't help:
D:\My Documents\Installs\Dev\Python\lxml\lxml-2.3.3>setup.py install
Building lxml version 2.3.3.
Building without Cython.
ERROR: 'xslt-config' is not recognized as an internal or external command,
operable program or batch file.
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
running install
running bdist_egg
running egg_info
writing src\lxml.egg-info\PKG-INFO
writing top-level names to src\lxml.egg-info\top_level.txt
writing dependency_links to src\lxml.egg-info\dependency_links.txt
reading manifest file 'src\lxml.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'lxml.etree.c' under directory 'src\lxml'
warning: no files found matching 'lxml.objectify.c' under directory 'src\lxml'
warning: no files found matching 'lxml.etree.h' under directory 'src\lxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'src\lxml'
warning: no files found matching 'etree_defs.h' under directory 'src\lxml'
warning: no files found matching 'pubkey.asc' under directory 'doc'
warning: no files found matching 'tagpython*.png' under directory 'doc'
warning: no files found matching 'Makefile' under directory 'doc'
writing manifest file 'src\lxml.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\lxml
copying src\lxml\builder.py -> build\lib.win32-2.7\lxml
copying src\lxml\cssselect.py -> build\lib.win32-2.7\lxml
copying src\lxml\doctestcompare.py -> build\lib.win32-2.7\lxml
copying src\lxml\ElementInclude.py -> build\lib.win32-2.7\lxml
copying src\lxml\pyclasslookup.py -> build\lib.win32-2.7\lxml
copying src\lxml\sax.py -> build\lib.win32-2.7\lxml
copying src\lxml\usedoctest.py -> build\lib.win32-2.7\lxml
copying src\lxml\_elementpath.py -> build\lib.win32-2.7\lxml
copying src\lxml\__init__.py -> build\lib.win32-2.7\lxml
creating build\lib.win32-2.7\lxml\html
copying src\lxml\html\builder.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\clean.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\defs.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\diff.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\formfill.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\_dictmixin.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\_diffcommand.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\_html5builder.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\_setmixin.py -> build\lib.win32-2.7\lxml\html
copying src\lxml\html\__init__.py -> build\lib.win32-2.7\lxml\html
creating build\lib.win32-2.7\lxml\isoschematron
copying src\lxml\isoschematron\__init__.py -> build\lib.win32-2.7\lxml\isoschematron
copying src\lxml\etreepublic.pxd -> build\lib.win32-2.7\lxml
copying src\lxml\tree.pxd -> build\lib.win32-2.7\lxml
copying src\lxml\etree_defs.h -> build\lib.win32-2.7\lxml
creating build\lib.win32-2.7\lxml\isoschematron\resources
creating build\lib.win32-2.7\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win32-2.7\lxml\isoschematron\resources\rng
creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl
creating build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win32-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
error: Unable to find vcvarsall.bat
[1]: http://lxml.de/
[2]: http://pypi.python.org/pypi/setuptools
lxml >= 3.x.x
download one of the MS Windows Installer packages
easy_install "c:/lxml_installer.exe" (credit kobejohn)
MS Windows Installer downloads available for lxml 3.3.5
a list of all binary/egg lxml package downloads.
lxml 2.3.x
there is no windows binary egg for lxml 2.3.3 (2.3.0 is the latest from 2.x.x).
without giving a version number easy_install will download the latest sources,
but you dont have the libxml2 and libxslt installed.
you could install the missing libs or you could try the 2.3 as there are binary eggs for windows:
easy_install lxml==2.3
you can download Unofficial Windows Binaries at:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
e.g. for python 2.7 32bit:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
It is the easiest way in win32.
I ran into the same problem. I don't know about the vcvarsall.bat issue but if you just want to install lxml you can use the graphical installers here:
https://pypi.python.org/pypi/lxml/3.2.3
That worked for me.
The ideal solution (which also works within virtual environments) has been provided here.
Basically, it comes down to downloading a fitting wheel file from here (the "cp" in the filename stands for your Python version) and then simply pip installing it.
It works on my (virtualenv) installation of Python3.3 on Windows 7 64-bit.
You can also use anaconda. Once you have it installed (http://continuum.io/downloads) you can just run conda install lxml to install lxml.
Related
I'm having some trouble installing the python cryptography package on my raspberry pi, specifically with python version 3.9.8 (installed with pyenv). The cryptography package is installed on my system using pacman (python-cryptography package), and thus works using the main python interpreter (3.10.1). However, I need some version of python 3.9 specifically for another package I am using in this project. Any time I try to install cryptography through the python 3.9.8 environment, I get the following error:
Building wheels for collected packages: cryptography
Building wheel for cryptography (pyproject.toml): started
Building wheel for cryptography (pyproject.toml): finished with status 'error'
Failed to build cryptography
ERROR: Command errored out with exit status 1:
command: /home/kioskuser/.local/share/virtualenvs/Kivy-Raspi-Desktop-App-EzpaxvF4/bin/python /home/kioskuser/.local/share/virtualenvs/Kivy-Raspi-Desktop-App-EzpaxvF4/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp4zxk3vu2
cwd: /tmp/pip-install-c5oajf7r/cryptography_5c58967b948d4a78862f30763d6e3c9e
Complete output (163 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.9
creating build/lib.linux-armv7l-3.9/cryptography
copying src/cryptography/utils.py -> build/lib.linux-armv7l-3.9/cryptography
copying src/cryptography/fernet.py -> build/lib.linux-armv7l-3.9/cryptography
copying src/cryptography/exceptions.py -> build/lib.linux-armv7l-3.9/cryptography
copying src/cryptography/__init__.py -> build/lib.linux-armv7l-3.9/cryptography
copying src/cryptography/__about__.py -> build/lib.linux-armv7l-3.9/cryptography
creating build/lib.linux-armv7l-3.9/cryptography/x509
copying src/cryptography/x509/oid.py -> build/lib.linux-armv7l-3.9/cryptography/x509
copying src/cryptography/x509/ocsp.py -> build/lib.linux-armv7l-3.9/cryptography/x509
copying src/cryptography/x509/name.py -> build/lib.linux-armv7l-3.9/cryptography/x509
copying src/cryptography/x509/general_name.py -> build/lib.linux-armv7l-3.9/cryptography/x509
copying src/cryptography/x509/extensions.py -> build/lib.linux-armv7l-3.9/cryptography/x509
copying src/cryptography/x509/certificate_transparency.py -> build/lib.linux-armv7l-3.9/cryptography/x509
copying src/cryptography/x509/base.py -> build/lib.linux-armv7l-3.9/cryptography/x509
copying src/cryptography/x509/__init__.py -> build/lib.linux-armv7l-3.9/cryptography/x509
creating build/lib.linux-armv7l-3.9/cryptography/hazmat
copying src/cryptography/hazmat/_oid.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat
copying src/cryptography/hazmat/__init__.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat
creating build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_serialization.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_cipheralgorithm.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_asymmetric.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives
creating build/lib.linux-armv7l-3.9/cryptography/hazmat/bindings
copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/bindings
creating build/lib.linux-armv7l-3.9/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/__init__.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends
creating build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/twofactor
creating build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/__init__.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/serialization
creating build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/kdf
creating build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/ciphers
creating build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/types.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/primitives/asymmetric
creating build/lib.linux-armv7l-3.9/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/bindings/openssl
creating build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.linux-armv7l-3.9/cryptography/hazmat/backends/openssl
running egg_info
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'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
copying src/cryptography/py.typed -> build/lib.linux-armv7l-3.9/cryptography
creating build/lib.linux-armv7l-3.9/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/__init__.pyi -> build/lib.linux-armv7l-3.9/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/asn1.pyi -> build/lib.linux-armv7l-3.9/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/ocsp.pyi -> build/lib.linux-armv7l-3.9/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/x509.pyi -> build/lib.linux-armv7l-3.9/cryptography/hazmat/bindings/_rust
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
cargo rustc --lib --manifest-path src/rust/Cargo.toml --release -v --features pyo3/abi3-py36 pyo3/extension-module -- --crate-type cdylib
Compiling proc-macro2 v1.0.32
Compiling unicode-xid v0.2.2
Compiling syn v1.0.81
Compiling autocfg v1.0.1
Running `rustc --crate-name build_script_build --edition=2018 /home/kioskuser/.cargo/registry/src/github.com-1285ae84e5963aae/proc-macro2-1.0.32/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=7a95d32b66ae1a1f -C extra-filename=-7a95d32b66ae1a1f --out-dir /tmp/pip-install-c5oajf7r/cryptography_5c58967b948d4a78862f30763d6e3c9e/src/rust/target/release/build/proc-macro2-7a95d32b66ae1a1f -L dependency=/tmp/pip-install-c5oajf7r/cryptography_5c58967b948d4a78862f30763d6e3c9e/src/rust/target/release/deps --cap-lints allow`
Running `rustc --crate-name unicode_xid /home/kioskuser/.cargo/registry/src/github.com-1285ae84e5963aae/unicode-xid-0.2.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="default"' -C metadata=2b7724452eebc032 -C extra-filename=-2b7724452eebc032 --out-dir /tmp/pip-install-c5oajf7r/cryptography_5c58967b948d4a78862f30763d6e3c9e/src/rust/target/release/deps -L dependency=/tmp/pip-install-c5oajf7r/cryptography_5c58967b948d4a78862f30763d6e3c9e/src/rust/target/release/deps --cap-lints allow`
Running `rustc --crate-name build_script_build --edition=2018 /home/kioskuser/.cargo/registry/src/github.com-1285ae84e5963aae/syn-1.0.81/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="extra-traits"' --cfg 'feature="full"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' -C metadata=6954389b44e215f9 -C extra-filename=-6954389b44e215f9 --out-dir /tmp/pip-install-c5oajf7r/cryptography_5c58967b948d4a78862f30763d6e3c9e/src/rust/target/release/build/syn-6954389b44e215f9 -L dependency=/tmp/pip-install-c5oajf7r/cryptography_5c58967b948d4a78862f30763d6e3c9e/src/rust/target/release/deps --cap-lints allow`
Running `rustc --crate-name autocfg /home/kioskuser/.cargo/registry/src/github.com-1285ae84e5963aae/autocfg-1.0.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on -C metadata=062cd71dd028816e -C extra-filename=-062cd71dd028816e --out-dir /tmp/pip-install-c5oajf7r/cryptography_5c58967b948d4a78862f30763d6e3c9e/src/rust/target/release/deps -L dependency=/tmp/pip-install-c5oajf7r/cryptography_5c58967b948d4a78862f30763d6e3c9e/src/rust/target/release/deps --cap-lints allow`
error: could not compile `unicode-xid`
Caused by:
process didn't exit successfully: `rustc --crate-name unicode_xid /home/kioskuser/.cargo/registry/src/github.com-1285ae84e5963aae/unicode-xid-0.2.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="default"' -C metadata=2b7724452eebc032 -C extra-filename=-2b7724452eebc032 --out-dir /tmp/pip-install-c5oajf7r/cryptography_5c58967b948d4a78862f30763d6e3c9e/src/rust/target/release/deps -L dependency=/tmp/pip-install-c5oajf7r/cryptography_5c58967b948d4a78862f30763d6e3c9e/src/rust/target/release/deps --cap-lints allow` (signal: 4, SIGILL: illegal instruction)
warning: build failed, waiting for other jobs to finish...
error: build failed
=============================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.9.8
platform: Linux-5.10.90-1-rpi-ARCH-armv7l-with-glibc2.32
pip: n/a
setuptools: 60.5.0
setuptools_rust: 1.1.2
=============================DEBUG ASSISTANCE=============================
error: cargo failed with code: 101
----------------------------------------
ERROR: Failed building wheel for cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects
✘ Installation Failed
So far I have tried:
Upgrading pip (now version 21.3.1)
Ensuring a rust compiler is installed (rustc version 1.57.0)
Ensure libffi is installed (version 3.4.2)
Ensure OpenSSL is installed (version 1.1.1)
Being an Arch Linux system, I of course have gcc installed for a C compiler (version 10.2.0)
Isolated the issue down to this package (I was initially trying to install cryptography as a dependency for msal)
Tried using pipenv as well as navigating directly to the python executable in the ~/.pyenv/versions/3.9.8 directory
In the ~/.pyenv/versions/3.9.8 directory, tried both using the pip executable there, as well as ./python -m pip for installation, with the same results both times.
The above steps also included checking all 4 of the suggested debugging steps from the error message.
It might also be useful to note that all of this works perfectly in the virtual environment on my main system (also Arch Linux, but x86_64 rather than ARM).
What else can I try to get the cryptography package installed?
Alternatively, it looks like the same version of the library is installed in the main site packages through pacman, but that of course is not recognized by the virtual environment or by a separate version of python. Is there some way I can force python 3.9.8 to use that package instead?
#jakub's solution ended up solving the problem for me. I uninstalled the version of rust that was installed through pacman. To replace it, I installed rustup and then using rustup, installed the latest nightly version of rust (1.60). Once I did that, installing the cryptography package worked just fine.
If you are using rustup, just make sure that you add ~/.cargo/bin to your PATH before installation. Also, the command I used to install rust through rustup was rustup toolchain install nightly.
I am running pyCharm on Windows 10 Pro. When I try to install autobahn libraries using pip, I get the following error:
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2.
The complete log for the command prompt is as follows:
Using cached https://files.pythonhosted.org/packages/35/77/1bf9b3c4c0850fd6f00996afcf5e71e35295c145833f4e2430d0a7fddbaa/autobahn-19.11.1-py2.py3-none-any.whl
Collecting six>=1.11.0 (from autobahn)
Using cached https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Collecting cryptography>=2.7 (from autobahn)
Using cached https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting txaio>=18.8.1 (from autobahn)
Using cached https://files.pythonhosted.org/packages/e9/6d/e1a6f7835cde86728e5bb1f577be9b2d7d273fdb33c286e70b087d418ded/txaio-18.8.1-py2.py3-none-any.whl
Collecting cffi!=1.11.3,>=1.8 (from cryptography>=2.7->autobahn)
Using cached https://files.pythonhosted.org/packages/2d/bf/960e5a422db3ac1a5e612cb35ca436c3fc985ed4b7ed13a1b4879006f450/cffi-1.13.2.tar.gz
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography>=2.7->autobahn)
Using cached https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
Building wheels for collected packages: cryptography
Building wheel for cryptography (PEP 517): started
Building wheel for cryptography (PEP 517): finished with status 'error'
Complete output from command C:\Users\divya\PycharmProjects\auto1\venv-new_without_global\Scripts\python.exe C:\Users\divya\PycharmProjects\auto1\venv-new_without_global\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_vendor\pep517\_in_process.py build_wheel C:\Users\divya\AppData\Local\Temp\tmp6wfys117:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\cryptography
copying src\cryptography\exceptions.py -> build\lib.win-amd64-3.8\cryptography
copying src\cryptography\fernet.py -> build\lib.win-amd64-3.8\cryptography
copying src\cryptography\utils.py -> build\lib.win-amd64-3.8\cryptography
copying src\cryptography\__about__.py -> build\lib.win-amd64-3.8\cryptography
copying src\cryptography\__init__.py -> build\lib.win-amd64-3.8\cryptography
creating build\lib.win-amd64-3.8\cryptography\hazmat
copying src\cryptography\hazmat\_der.py -> build\lib.win-amd64-3.8\cryptography\hazmat
copying src\cryptography\hazmat\_oid.py -> build\lib.win-amd64-3.8\cryptography\hazmat
copying src\cryptography\hazmat\__init__.py -> build\lib.win-amd64-3.8\cryptography\hazmat
creating build\lib.win-amd64-3.8\cryptography\x509
copying src\cryptography\x509\base.py -> build\lib.win-amd64-3.8\cryptography\x509
copying src\cryptography\x509\certificate_transparency.py -> build\lib.win-amd64-3.8\cryptography\x509
copying src\cryptography\x509\extensions.py -> build\lib.win-amd64-3.8\cryptography\x509
copying src\cryptography\x509\general_name.py -> build\lib.win-amd64-3.8\cryptography\x509
copying src\cryptography\x509\name.py -> build\lib.win-amd64-3.8\cryptography\x509
copying src\cryptography\x509\ocsp.py -> build\lib.win-amd64-3.8\cryptography\x509
copying src\cryptography\x509\oid.py -> build\lib.win-amd64-3.8\cryptography\x509
copying src\cryptography\x509\__init__.py -> build\lib.win-amd64-3.8\cryptography\x509
creating build\lib.win-amd64-3.8\cryptography\hazmat\backends
copying src\cryptography\hazmat\backends\interfaces.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends
copying src\cryptography\hazmat\backends\__init__.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends
creating build\lib.win-amd64-3.8\cryptography\hazmat\bindings
copying src\cryptography\hazmat\bindings\__init__.py -> build\lib.win-amd64-3.8\cryptography\hazmat\bindings
creating build\lib.win-amd64-3.8\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\cmac.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\constant_time.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\hashes.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\hmac.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\keywrap.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\padding.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\poly1305.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\__init__.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives
creating build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\aead.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\backend.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ciphers.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\cmac.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\decode_asn1.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\dh.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\dsa.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ec.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ed25519.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ed448.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\encode_asn1.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\hashes.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\hmac.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ocsp.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\poly1305.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\rsa.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\utils.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\x25519.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\x448.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\x509.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\__init__.py -> build\lib.win-amd64-3.8\cryptography\hazmat\backends\openssl
creating build\lib.win-amd64-3.8\cryptography\hazmat\bindings\openssl
copying src\cryptography\hazmat\bindings\openssl\binding.py -> build\lib.win-amd64-3.8\cryptography\hazmat\bindings\openssl
copying src\cryptography\hazmat\bindings\openssl\_conditional.py -> build\lib.win-amd64-3.8\cryptography\hazmat\bindings\openssl
copying src\cryptography\hazmat\bindings\openssl\__init__.py -> build\lib.win-amd64-3.8\cryptography\hazmat\bindings\openssl
creating build\lib.win-amd64-3.8\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\dh.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\dsa.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\ec.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\ed25519.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\ed448.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\padding.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\rsa.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\utils.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\x25519.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\x448.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\__init__.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\asymmetric
creating build\lib.win-amd64-3.8\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\aead.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\algorithms.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\base.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\modes.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\__init__.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\ciphers
creating build\lib.win-amd64-3.8\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\concatkdf.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\hkdf.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\kbkdf.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\pbkdf2.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\scrypt.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\x963kdf.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\__init__.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\kdf
creating build\lib.win-amd64-3.8\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization\base.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization\pkcs12.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization\ssh.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization\__init__.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\serialization
creating build\lib.win-amd64-3.8\cryptography\hazmat\primitives\twofactor
copying src\cryptography\hazmat\primitives\twofactor\hotp.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\twofactor
copying src\cryptography\hazmat\primitives\twofactor\totp.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\twofactor
copying src\cryptography\hazmat\primitives\twofactor\utils.py -> build\lib.win-amd64-3.8\cryptography\hazmat\primitives\twofactor
copying src\cryptography\hazmat\primitives\twofactor\__init__.py -> build\lib.win-amd64-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 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'
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
generating cffi module 'build\\temp.win-amd64-3.8\\Release\\_padding.c'
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
generating cffi module 'build\\temp.win-amd64-3.8\\Release\\_constant_time.c'
generating cffi module 'build\\temp.win-amd64-3.8\\Release\\_openssl.c'
building '_openssl' extension
creating build\temp.win-amd64-3.8\Release\build
creating build\temp.win-amd64-3.8\Release\build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release\build\temp.win-amd64-3.8\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\divya\PycharmProjects\auto1\venv-new_without_global\include -IC:\Users\divya\AppData\Local\Programs\Python\Python38\include -IC:\Users\divya\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcbuild\temp.win-amd64-3.8\Release\_openssl.c /Fobuild\temp.win-amd64-3.8\Release\build\temp.win-amd64-3.8\Release\_openssl.obj
_openssl.c
build\temp.win-amd64-3.8\Release\_openssl.c(498): 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\\BuildTools\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
Running setup.py clean for cryptography
Failed to build cryptography
Failed building wheel for cryptography
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
However, when I try to install autobahn and cryptography using windows elevated command prompt(run as administrator), it installs correctly. Can anyone iterate how to install autobahn and cryptography without admin privileges and without including global-site packages in pyCharm?
P.S I have already installed MS Visual Studio build tools 2019 and openssl_X64.
All sorta new to using Microsoft Azure and needed help deploying a Django App to it. When I push the code from my local repo to Azure it gives me this log.
I noticed it says :
The headers or library files could not be found for zlib, a required
dependency when compiling Pillow from source. Please see the install
instructions at
https://pillow.readthedocs.io/en/latest/installation.html
I did more reading and learnt that Azure cannot install PIL or Pillow from the environment and hence needs to be installed on my system and then uploaded to Azure. I included a file called ".skipPythonDeployment" so that it doesn't erase the environment set on my local system, but then the deployment would fail again.
The important part of the Log generated while Pushing the code to Azure is attached below.
Detected requirements.txt. You can skip Python specific steps with
a .skipPythonDeployment file. Detecting Python runtime from site
configuration Detected python-2.7 Deleting incompatible virtual
environment.
............................................................ Creating
python-2.7 virtual environment.
Downloading/unpacking pillow (from -r requirements.txt (line 4))
.... Running setup.py
(path:D:\home\site\wwwroot\env\build\pillow\setup.py) egg_info for
package pillow
Single threaded build for windows
warning: no files found matching '.sh'
no previously-included directories found matching 'docs_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files found matching '.travis*'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution
warning: no files found matching '.sh'
no previously-included directories found matching 'docs_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files found matching '.travis*'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution Downloading/unpacking Werkzeug (from -r
requirements.txt (line 5)) Downloading/unpacking flask-cors (from -r
requirements.txt (line 6)) Downloading
Flask_Cors-3.0.2-py2.py3-none-any.whl Downloading/unpacking
Flask>=0.8 (from flask-restful->-r requirements.txt (line 1))
Downloading/unpacking pytz (from flask-restful->-r requirements.txt
(line 1)) Downloading/unpacking six>=1.3.0 (from flask-restful->-r
requirements.txt (line 1)) Downloading
six-1.10.0-py2.py3-none-any.whl Downloading/unpacking aniso8601>=0.82
(from flask-restful->-r requirements.txt (line 1)) Running setup.py
(path:D:\home\site\wwwroot\env\build\aniso8601\setup.py) egg_info for
package aniso8601
Downloading/unpacking olefile (from pillow->-r requirements.txt (line 4)) Running setup.py
(path:D:\home\site\wwwroot\env\build\olefile\setup.py) egg_info for
package olefile
Downloading/unpacking itsdangerous>=0.21 (from Flask>=0.8->flask-restful->-r requirements.txt (line 1)) Running
setup.py (path:D:\home\site\wwwroot\env\build\itsdangerous\setup.py)
egg_info for package itsdangerous
warning: no previously-included files matching '' found under directory 'docs_build' Downloading/unpacking Jinja2>=2.4 (from
Flask>=0.8->flask-restful->-r requirements.txt (line 1))
Downloading/unpacking click>=2.0 (from Flask>=0.8->flask-restful->-r
requirements.txt (line 1)) Downloading/unpacking python-dateutil
(from aniso8601>=0.82->flask-restful->-r requirements.txt (line 1))
Downloading/unpacking MarkupSafe>=0.23 (from
Jinja2>=2.4->Flask>=0.8->flask-restful->-r requirements.txt (line 1))
Downloading MarkupSafe-1.0.tar.gz Running setup.py
(path:D:\home\site\wwwroot\env\build\MarkupSafe\setup.py) egg_info for
package MarkupSafe
Installing collected packages: flask-restful, numpy, pydicom, pillow, Werkzeug, flask-cors, Flask, pytz, six, aniso8601, olefile,
itsdangerous, Jinja2, click, python-dateutil, MarkupSafe
.................. : .................. Running setup.py install
for pydicom .
.. Running setup.py install for pillow
Single threaded build for windows
warning: no files found matching '.sh'
no previously-included directories found matching 'docs_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files found matching '.travis*'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\home\site\wwwroot\env\build\pillow\setup.py", line 756, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Complete output from command D:\home\site\wwwroot\env\Scripts\python.exe -c "import setuptools,
tokenize;file='D:\home\site\wwwroot\env\build\pillow\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
d:\local\temp\pip-nu1mtm-record\install-record.txt
--single-version-externally-managed --compile --install-headers D:\home\site\wwwroot\env\include\site\python2.7:
Single threaded build for windows running install running build running build_py creating build creating
build\lib.win32-2.7 creating build\lib.win32-2.7\PIL copying
PIL\BdfFontFile.py -> build\lib.win32-2.7\PIL copying
PIL\BmpImagePlugin.py -> build\lib.win32-2.7\PIL copying
PIL\BufrStubImagePlugin.py -> build\lib.win32-2.7\PIL copying
PIL\ContainerIO.py -> build\lib.win32-2.7\PIL copying
PIL\CurImagePlugin.py -> build\lib.win32-2.7\PIL copying
PIL\DcxImagePlugin.py -> build\lib.win32-2.7\PIL copying
PIL\DdsImagePlugin.py -> build\lib.win32-2.7\PIL copying
PIL\EpsImagePlugin.py -> build\lib.win32-2.7\PIL copying
PIL\ExifTags.py -> build\lib.win32-2.7\PIL copying PIL\features.py
-> build\lib.win32-2.7\PIL copying PIL\FitsStubImagePlugin.py -> build\lib.win32-2.7\PIL copying PIL\FliImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\FontFile.py ->
build\lib.win32-2.7\PIL copying PIL\FpxImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\FtexImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\GbrImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\GdImageFile.py ->
build\lib.win32-2.7\PIL copying PIL\GifImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\GimpGradientFile.py ->
build\lib.win32-2.7\PIL copying PIL\GimpPaletteFile.py ->
build\lib.win32-2.7\PIL copying PIL\GribStubImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\Hdf5StubImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\IcnsImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\IcoImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\Image.py ->
build\lib.win32-2.7\PIL copying PIL\ImageChops.py ->
build\lib.win32-2.7\PIL copying PIL\ImageCms.py ->
build\lib.win32-2.7\PIL copying PIL\ImageColor.py ->
build\lib.win32-2.7\PIL copying PIL\ImageDraw.py ->
build\lib.win32-2.7\PIL copying PIL\ImageDraw2.py ->
build\lib.win32-2.7\PIL copying PIL\ImageEnhance.py ->
build\lib.win32-2.7\PIL copying PIL\ImageFile.py ->
build\lib.win32-2.7\PIL copying PIL\ImageFilter.py ->
build\lib.win32-2.7\PIL copying PIL\ImageFont.py ->
build\lib.win32-2.7\PIL copying PIL\ImageGrab.py ->
build\lib.win32-2.7\PIL copying PIL\ImageMath.py ->
build\lib.win32-2.7\PIL copying PIL\ImageMode.py ->
build\lib.win32-2.7\PIL copying PIL\ImageMorph.py ->
build\lib.win32-2.7\PIL copying PIL\ImageOps.py ->
build\lib.win32-2.7\PIL copying PIL\ImagePalette.py ->
build\lib.win32-2.7\PIL copying PIL\ImagePath.py ->
build\lib.win32-2.7\PIL copying PIL\ImageQt.py ->
build\lib.win32-2.7\PIL copying PIL\ImageSequence.py ->
build\lib.win32-2.7\PIL copying PIL\ImageShow.py ->
build\lib.win32-2.7\PIL copying PIL\ImageStat.py ->
build\lib.win32-2.7\PIL copying PIL\ImageTk.py ->
build\lib.win32-2.7\PIL copying PIL\ImageTransform.py ->
build\lib.win32-2.7\PIL copying PIL\ImageWin.py ->
build\lib.win32-2.7\PIL copying PIL\ImImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\ImtImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\IptcImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\Jpeg2KImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\JpegImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\JpegPresets.py ->
build\lib.win32-2.7\PIL copying PIL\McIdasImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\MicImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\MpegImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\MpoImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\MspImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\OleFileIO.py ->
build\lib.win32-2.7\PIL copying PIL\PaletteFile.py ->
build\lib.win32-2.7\PIL copying PIL\PalmImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PcdImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PcfFontFile.py ->
build\lib.win32-2.7\PIL copying PIL\PcxImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PdfImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PixarImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PngImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PpmImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PsdImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\PSDraw.py ->
build\lib.win32-2.7\PIL copying PIL\PyAccess.py ->
build\lib.win32-2.7\PIL copying PIL\SgiImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\SpiderImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\SunImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\TarIO.py ->
build\lib.win32-2.7\PIL copying PIL\TgaImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\TiffImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\TiffTags.py ->
build\lib.win32-2.7\PIL copying PIL\WalImageFile.py ->
build\lib.win32-2.7\PIL copying PIL\WebPImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\WmfImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\XbmImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\XpmImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL\XVThumbImagePlugin.py ->
build\lib.win32-2.7\PIL copying PIL_binary.py ->
build\lib.win32-2.7\PIL copying PIL_tkinter_finder.py ->
build\lib.win32-2.7\PIL copying PIL_util.py ->
build\lib.win32-2.7\PIL copying PIL__init__.py ->
build\lib.win32-2.7\PIL running egg_info writing requirements to
Pillow.egg-info\requires.txt writing Pillow.egg-info\PKG-INFO
writing top-level names to Pillow.egg-info\top_level.txt writing
dependency_links to Pillow.egg-info\dependency_links.txt warning:
manifest_maker: standard file '-c' not found
reading manifest file 'Pillow.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching
'.sh' no previously-included directories found matching
'docs_static' warning: no previously-included files found matching
'.coveragerc' warning: no previously-included files found matching
'.editorconfig' warning: no previously-included files found
matching '.landscape.yaml' warning: no previously-included files
found matching '.travis' warning: no previously-included files
found matching '.travis*' warning: no previously-included files
found matching 'appveyor.yml' warning: no previously-included files
found matching 'build_children.sh' warning: no previously-included
files found matching 'tox.ini' warning: no previously-included
files matching '.git' found anywhere in distribution warning: no
previously-included files matching '.pyc' found anywhere in
distribution warning: no previously-included files matching '.so'
found anywhere in distribution writing manifest file
'Pillow.egg-info\SOURCES.txt' running build_ext
The headers or library files could not be found for zlib, a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\home\site\wwwroot\env\build\pillow\setup.py", line 756, in <module>
raise RequiredDependencyException(msg) __main__.RequiredDependencyException:
The headers or library files could not be found for zlib, a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
---------------------------------------- Cleaning up... .................................................... Command
D:\home\site\wwwroot\env\Scripts\python.exe -c "import setuptools,
tokenize;file='D:\home\site\wwwroot\env\build\pillow\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
d:\local\temp\pip-nu1mtm-record\install-record.txt
--single-version-externally-managed --compile --install-headers D:\home\site\wwwroot\env\include\site\python2.7 failed with error code
1 in D:\home\site\wwwroot\env\build\pillow Storing debug log for
failure in D:\home\pip\pip.log An error has occurred during web site
deployment. Error - Changes committed to remote repository but
deployment to website failed.
Thank you
It seems that you were using Azure Web Apps/App Services for deploying your Django App which contains the Pillow package, and the Pillow package seems that you declared in the requirements.txt like Pillow>=2.0.0.
However, unfortunately, there are two issues for using the Pillow package on Azure App Services.
Pillow includes C code which need to be compiled when deploying your app into Azure. The solution is that you need to build a wheel file of Pillow to add it to your project and declare the wheel file in the requirements.txt, please refer to the section Troubleshooting - Package Installation of Azure offical tutorial for Django to know it.
Pillow as an image library for Python required GDI API & resources. On Azure App Services, any GDI calls are restricted and blocked, please see here to know.
So the only way for deploying your Django App is using Azure VM.
Your pip is too old to download the whl (known issues with default version of Python). Please update your Python installation or update pip directly:
https://blogs.msdn.microsoft.com/pythonengineering/2016/08/04/upgrading-python-on-azure-app-service/
i'm on win7/64, and have some pythons already, but want to be installing mosek to a new WinPython
>where python
C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\python.exe
C:\Python27\python.exe
C:\Program Files (x86)\LilyPond\usr\bin\python.exe
i'm following these instructions
>cd C:\Program Files\Mosek\7\tools\platform\win64x86\python\2
>python setup.py build --build-base c:\Users\nlab install --user
running build
running build_py
creating c:\Users\nlab\lib
creating c:\Users\nlab\lib\mosek
copying mosek\array.py -> c:\Users\nlab\lib\mosek
copying mosek\__init__.py -> c:\Users\nlab\lib\mosek
creating c:\Users\nlab\lib\mosek\fusion
copying mosek\fusion\SolverInfo.py -> c:\Users\nlab\lib\mosek\fusion
copying mosek\fusion\Utils.py -> c:\Users\nlab\lib\mosek\fusion
copying mosek\fusion\__init__.py -> c:\Users\nlab\lib\mosek\fusion
running install
running install_lib
creating C:\Users\nlab\AppData\Roaming\Python
creating C:\Users\nlab\AppData\Roaming\Python\Python27
creating C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages
creating C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
copying c:\Users\nlab\lib\mosek\array.py -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
creating C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion
copying c:\Users\nlab\lib\mosek\fusion\SolverInfo.py -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion
copying c:\Users\nlab\lib\mosek\fusion\Utils.py -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion
copying c:\Users\nlab\lib\mosek\fusion\__init__.py -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion
copying c:\Users\nlab\lib\mosek\__init__.py -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
byte-compiling C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\array.py to array.pyc
byte-compiling C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion\SolverInfo.py to SolverInfo.pyc
byte-compiling C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion\Utils.py to Utils.pyc
byte-compiling C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion\__init__.py to __init__.pyc
byte-compiling C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\__init__.py to __init__.pyc
running install_data
copying C:\Program Files\Mosek\7\tools\platform\win64x86\python\2\..\..\bin\mosek64_7_1.dll -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
copying C:\Program Files\Mosek\7\tools\platform\win64x86\python\2\..\..\bin\mosekglb64_7_1.dll -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
copying C:\Program Files\Mosek\7\tools\platform\win64x86\python\2\..\..\bin\mosekxx7_1.dll -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
copying C:\Program Files\Mosek\7\tools\platform\win64x86\python\2\..\..\bin\libiomp5md.dll -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
copying C:\Program Files\Mosek\7\tools\platform\win64x86\python\2\..\..\..\..\..\license.pdf -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
running install_egg_info
Writing C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\Mosek-7.1.31-py2.7.egg-info
Please review the MOSEK license conditions in license.pdf
that created and used
C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\
but i want
C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\Lib\site-packages\
i tried using WinPython's exe explicitly:
>C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\python.exe setup.py build --build-base c:\Users\nlab install --user
running build
running build_py
running install
running install_lib
running install_data
running install_egg_info
Removing C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\Mosek-7.1.31-py2.7.egg-info
Writing C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\Mosek-7.1.31-py2.7.egg-info
Please review the MOSEK license conditions in license.pdf
but that doesn't seem to help
I believe it is your setup.py options which are causing the error. Specifically the user option will install into a specific directory linked to your user profile
https://docs.python.org/2/install/#alternate-installation-the-user-scheme
, regardless of what's linked to the WinPython. This is for users who do not have write privileges in system directories. If you want to link the install to your WinPython, then run
C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\python.exe setup.py install
And if you want to be sure it installs in the correct location, use the --prefix option
https://docs.python.org/2/install/#alternate-installation-windows-the-prefix-scheme
e.g.
python.exe setup.py install --prefix="C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\"
... but this shouldn't be necessary as that is just the default prefix associated with this particular WinPython.
I'm using setuptools to create a quick setup.py script to install dependencies for the user. The package only requires numpy and matlibplot. So the code looks something like this:
from setuptools import setup
setup(
name = "somePackageName",
version = "1.0",
packages = ['doc', 'inputs', 'inputs', 'src'],
install_requires = ['distribute == 0.7.3', 'numpy', 'matplotlib']
)
running sudo python setup.py install gives me the following:
running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
creating fabSim.egg-info
writing requirements to fabSim.egg-info/requires.txt
writing fabSim.egg-info/PKG-INFO
writing top-level names to fabSim.egg-info/top_level.txt
writing dependency_links to fabSim.egg-info/dependency_links.txt
writing manifest file 'fabSim.egg-info/SOURCES.txt'
reading manifest file 'fabSim.egg-info/SOURCES.txt'
writing manifest file 'fabSim.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/doc
copying doc/__init__.py -> build/lib.linux-x86_64-2.7/doc
creating build/lib.linux-x86_64-2.7/inputs
copying inputs/__init__.py -> build/lib.linux-x86_64-2.7/inputs
creating build/lib.linux-x86_64-2.7/src
copying src/simulation.py -> build/lib.linux-x86_64-2.7/src
copying src/good.py -> build/lib.linux-x86_64-2.7/src
copying src/producer.py -> build/lib.linux-x86_64-2.7/src
copying src/__init__.py -> build/lib.linux-x86_64-2.7/src
copying src/validate.py -> build/lib.linux-x86_64-2.7/src
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/doc
copying build/lib.linux-x86_64-2.7/doc/__init__.py -> build/bdist.linux-x86_64/egg/doc
creating build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/simulation.py -> build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/good.py -> build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/producer.py -> build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/__init__.py -> build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/validate.py -> build/bdist.linux-x86_64/egg/src
creating build/bdist.linux-x86_64/egg/inputs
copying build/lib.linux-x86_64-2.7/inputs/__init__.py -> build/bdist.linux-x86_64/egg/inputs
byte-compiling build/bdist.linux-x86_64/egg/doc/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/simulation.py to simulation.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/good.py to good.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/producer.py to producer.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/validate.py to validate.pyc
byte-compiling build/bdist.linux-x86_64/egg/inputs/__init__.py to __init__.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/fabSim-1.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing fabSim-1.0-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/fabSim-1.0-py2.7.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/fabSim-1.0-py2.7.egg
Extracting fabSim-1.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
fabSim 1.0 is already the active version in easy-install.pth
Installed /usr/local/lib/python2.7/dist-packages/fabSim-1.0-py2.7.egg
Processing dependencies for fabSim==1.0
Searching for matplotlib
Reading http://pypi.python.org/simple/matplotlib/
Reading http://matplotlib.sourceforge.net
Reading http://sourceforge.net/project/showfiles.php?group_id=80706
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/
Reading http://matplotlib.org
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.1/
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/
Reading http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/
Reading http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/
Best match: matplotlib 1.3.0
Downloading https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.0/matplotlib-1.3.0.tar.gz
Processing matplotlib-1.3.0.tar.gz
Writing /tmp/easy_install-xOXtid/matplotlib-1.3.0/setup.cfg
Running matplotlib-1.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xOXtid/matplotlib-1.3.0/egg-dist-tmp-JFeCc4
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.
(Currently using distribute 0.6.28dev-r0 (/usr/lib/python2.7/dist-packages))
error: Setup script exited with 2
My understanding of setuptools is probably off as I expect it to update/install available dependencies from PyPI. Could someone provide additional insight on this?
pip install -U distribute
or
easy_install -U distribute