Skip to content

Instantly share code, notes, and snippets.

@calvinchengx
Last active July 14, 2021 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calvinchengx/b98bb80ab8257d531c19db8303010b74 to your computer and use it in GitHub Desktop.
Save calvinchengx/b98bb80ab8257d531c19db8303010b74 to your computer and use it in GitHub Desktop.
Installing cryptography and friends with poetry
#!/bin/bash
# initialise and configure a pyproject.toml file (similar to Cargo.toml)
poetry init
# python's cryptography package requires openssl and rust
brew install openssl rust
env LDFLAGS="-L$(brew --prefix openssl@1.1)/lib" CFLAGS="-I$(brew --prefix openssl@1.1)/include" poetry add cryptography
# then the rest
poetry add pycryptodome pynacl progressbar2 pyusb
source .venv/bin/activate
python -c "import Crypto; print(Crypto.__version__)"
python -c "import cryptography; print(cryptography.__version__)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment