{"id":1116,"hash":"4280386d9355e2bdbb46a42711e2f642125e124f412c46ce486eb0a6bec4bec3","pattern":"Pipenv install fails on cryptography package: &quot;Disabling PEP 517 processing is invalid&quot; error","full_message":"Without being aware of it, I've been using the cryptography package for many months now without issue, but suddenly it won't build and it's brought development on my project to a halt.\n\nIt turns out cryptography is a dependency of one of the other packages in my Pipfile: apns2. As I said, it's been working fine, but something must have changed in my environment. Here is my Pipfile with just that package isolated:\n\n[[source]]\nurl = \"https://pypi.python.org/simple\"\nverify_ssl = true\nname = \"pypi\"\n\n[requires]\npython_version = \"3.7.9\"\n\n[packages]\n\napns2 = \"*\"\n\n[dev-packages]\n\nThis fails. I use pipenv (the latest version 2020.11.15), so when I run it now this is the output:\n\n# pipenv install\nCreating a virtualenv for this project...\nPipfile: /Users/dylan/Dev/RideHare/server/Pipfile\nUsing /Users/dylan/.pyenv/versions/3.7.9/bin/python3.7m (3.7.9) to create virtualenv...\n⠏ Creating virtual environment...created virtual environment CPython3.7.9.final.0-64 in 502ms\n  creator CPython3Posix(dest=/Users/dylan/.local/share/virtualenvs/server-2uc2X-TS, clear=False, global=False)\n  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/dylan/Library/Application Support/virtualenv)\n    added seed packages: pip==20.2.2, setuptools==51.0.0, wheel==0.35.1\n  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator\n\n✔ Successfully created virtual environment! \nVirtualenv location: /Users/dylan/.local/share/virtualenvs/server-2uc2X-TS\nInstalling dependencies from Pipfile.lock (aa4cd9)...\nAn error occurred while installing cryptography==3.3.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' --hash=sha256:84ef7a0c10c24a7773163f917f1cb6b4444597efd505a8aed0a22e8c4780f27e --hash=sha256:788a3c9942df5e4371c199d10383f44a105d67d401fb4304178020142f020244 --hash=sha256:9f6b0492d111b43de5f70052e24c1f0951cb9e6022188ebcb1cc3a3d301469b0 --hash=sha256:a69bd3c68b98298f490e84519b954335154917eaab52cf582fa2c5c7efc6e812 --hash=sha256:b4890d5fb9b7a23e3bf8abf5a8a7da8e228f1e97dc96b30b95685df840b6914a --hash=sha256:0003a52a123602e1acee177dc90dd201f9bb1e73f24a070db7d36c588e8f5c7d --hash=sha256:7e177e4bea2de937a584b13645cab32f25e3d96fc0bc4a4cf99c27dc77682be6 --hash=sha256:dc42f645f8f3a489c3dd416730a514e7a91a59510ddaadc09d04224c098d3302 --hash=sha256:69e836c9e5ff4373ce6d3ab311c1a2eed274793083858d3cd4c7d12ce20d5f9c --hash=sha256:9e21301f7a1e7c03dbea73e8602905a4ebba641547a462b26dd03451e5769e7c --hash=sha256:0e85aaae861d0485eb5a79d33226dd6248d2a9f133b81532c8f5aae37de10ff7 --hash=sha256:c366df0401d1ec4e548bebe8f91d55ebcc0ec3137900d214dd7aac8427ef3030 --hash=sha256:594a1db4511bc4d960571536abe21b4e5c3003e8750ab8365fafce71c5d86901 --hash=sha256:83d9d2dfec70364a74f4e7c70ad04d3ca2e6a08b703606993407bf46b97868c5! Will try again.\n  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 10/10 — 00:00:08\nInstalling initially failed dependencies...\n[InstallError]:   File \"/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/cli/command.py\", line 233, in install\n[InstallError]:       retcode = do_install(\n[InstallError]:   File \"/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/core.py\", line 2052, in do_install\n[InstallError]:       do_init(\n[InstallError]:   File \"/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/core.py\", line 1304, in do_init\n[InstallError]:       do_install_dependencies(\n[InstallError]:   File \"/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/core.py\", line 899, in do_install_dependencies\n[InstallError]:       batch_install(\n[InstallError]:   File \"/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/core.py\", line 796, in batch_install\n[InstallError]:       _cleanup_procs(procs, failed_deps_queue, retry=retry)\n[InstallError]:   File \"/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/core.py\", line 703, in _cleanup_procs\n[InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)\n[pipenv.exceptions.InstallError]: Looking in indexes: https://pypi.python.org/simple\n[pipenv.exceptions.InstallError]: Collecting cryptography==3.3.1\n[pipenv.exceptions.InstallError]:   Using cached cryptography-3.3.1.tar.gz (539 kB)\n[pipenv.exceptions.InstallError]: ERROR: Disabling PEP 517 processing is invalid: project specifies a build backend of setuptools.build_meta in pyproject.toml\nERROR: Couldn't install package: cryptography\n Package installation failed...\n  ☤  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/1 — 00:00:01\n\nIf instead of the apns2 line in the Pipfile I substitute cryptography explicitly (crytography = \"*\"), it fails too in the same way.","ecosystem":"pypi","package_name":"python-3.x","package_version":null,"solution":"It seems the cryptography package can only be installed with pip, not pipenv, so by doing this first...\n\nbrew install pkg-config libffi openssl\nenv LDFLAGS=\"-L$(brew --prefix openssl)/lib\" CFLAGS=\"-I$(brew --prefix openssl)/include\" pip install cryptography\n\n(Commands taken from this question.)\n\n...I could then run pipenv install which built and installed everything fine.","confidence":0.9,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/65658570/pipenv-install-fails-on-cryptography-package-disabling-pep-517-processing-is-i","votes":19,"created_at":"2026-04-19T04:52:22.556524+00:00","updated_at":"2026-04-19T04:52:22.556524+00:00"}