Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't install joinmarket. Building wheel for cryptography error. #1139

Closed
ChzenChzen opened this issue Jan 5, 2022 · 23 comments
Closed

Comments

@ChzenChzen
Copy link

ChzenChzen commented Jan 5, 2022

cryptography already is included

pip install cryptography
Requirement already satisfied: cryptography in /Users/fomotoshi/.pyenv/versions/3.10.1/lib/python3.10/site-packages (36.0.1)
Requirement already satisfied: cffi>=1.12 in /Users/fomotoshi/.pyenv/versions/3.10.1/lib/python3.10/site-packages (from cryptography) (1.15.0)
Requirement already satisfied: pycparser in /Users/fomotoshi/.pyenv/versions/3.10.1/lib/python3.10/site-packages (from cffi>=1.12->cryptography) (2.21)

also I have installed rust:

rustup show
Default host: aarch64-apple-darwin
rustup home:  /Users/fomotoshi/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin (default)
stable-x86_64-apple-darwin
1.56.0-aarch64-apple-darwin

active toolchain
----------------

stable-aarch64-apple-darwin (default)
rustc 1.57.0 (f1edd0429 2021-11-29)

Also I installed openssl through brew

brew install openssl@1.1 rust

./install.sh log

Building wheel for cryptography (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/fomotoshi/Documents/joinmarket/jmvenv/bin/python /Users/fomotoshi/Documents/joinmarket/jmvenv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/d2/r3gzsqg56hz_r56kkxzfkbb40000gn/T/tmplfute3f7
       cwd: /private/var/folders/d2/r3gzsqg56hz_r56kkxzfkbb40000gn/T/pip-install-iu075i52/cryptography_e307fd54e9ca44b2aaab299777650844
  Complete output (138 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-12.1-arm64-3.10
  creating build/lib.macosx-12.1-arm64-3.10/cryptography
  copying src/cryptography/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography
  copying src/cryptography/utils.py -> build/lib.macosx-12.1-arm64-3.10/cryptography
  copying src/cryptography/__about__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography
  copying src/cryptography/exceptions.py -> build/lib.macosx-12.1-arm64-3.10/cryptography
  copying src/cryptography/fernet.py -> build/lib.macosx-12.1-arm64-3.10/cryptography
  creating build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat
  copying src/cryptography/hazmat/_der.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat
  copying src/cryptography/hazmat/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat
  copying src/cryptography/hazmat/_oid.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat
  creating build/lib.macosx-12.1-arm64-3.10/cryptography/x509
  copying src/cryptography/x509/oid.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/x509
  copying src/cryptography/x509/ocsp.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/x509
  copying src/cryptography/x509/general_name.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/x509
  copying src/cryptography/x509/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/x509
  copying src/cryptography/x509/extensions.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/x509
  copying src/cryptography/x509/name.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/x509
  copying src/cryptography/x509/base.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/x509
  copying src/cryptography/x509/certificate_transparency.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/x509
  creating build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends
  creating build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/padding.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives
  creating build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/bindings
  copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/bindings
  creating build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ocsp.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/backends/openssl
  creating build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/kdf
  creating build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/twofactor
  creating build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/serialization
  creating build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/ciphers
  creating build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/primitives/asymmetric
  creating build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.macosx-12.1-arm64-3.10/cryptography/hazmat/bindings/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 'rtd-requirements.txt'
  warning: no previously-included files found matching 'tox.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'
  running build_ext
  creating build/temp.macosx-12.1-arm64-3.10
  creating build/temp.macosx-12.1-arm64-3.10/build
  creating build/temp.macosx-12.1-arm64-3.10/build/temp.macosx-12.1-arm64-3.10
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/fomotoshi/Documents/joinmarket/jmvenv/include -I/Users/fomotoshi/.pyenv/versions/3.10.1/include/python3.10 -c build/temp.macosx-12.1-arm64-3.10/_openssl.c -o build/temp.macosx-12.1-arm64-3.10/build/temp.macosx-12.1-arm64-3.10/_openssl.o -Wconversion -Wno-error=sign-conversion
  build/temp.macosx-12.1-arm64-3.10/_openssl.c:575:10: fatal error: 'openssl/opensslv.h' file not found
  #include <openssl/opensslv.h>
           ^~~~~~~~~~~~~~~~~~~~
  1 error generated.

      =============================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.html for specific
         instructions for your platform.
      3) Check our frequently asked questions for more information:
         https://cryptography.io/en/latest/faq.html
      =============================DEBUG ASSISTANCE=============================

  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for cryptography
  Building wheel for bencoder.pyx (pyproject.toml) ... done
  Created wheel for bencoder.pyx: filename=bencoder.pyx-3.0.0-cp310-cp310-macosx_12_0_arm64.whl size=42563 sha256=3ce135e29df818cdfa3e58d58fa06e0f13ce8eeef96b0b5f64076cc147fefd5f
  Stored in directory: /Users/fomotoshi/Library/Caches/pip/wheels/dc/8b/ed/ee4a8b8f21633570de4358381a89ed25a1eedefa3c9e422125
  Building wheel for pyaes (setup.py) ... done
  Created wheel for pyaes: filename=pyaes-1.6.1-py3-none-any.whl size=26363 sha256=352d8a2202c71e98d3ec6610ce16f70a19423d6fb86c22618ca0d0cfeae69a36
  Stored in directory: /Users/fomotoshi/Library/Caches/pip/wheels/d6/84/5f/ea6aef85a93c7e1922486369874f4740a5642d261e09c59140
  Building wheel for urldecode (setup.py) ... done
  Created wheel for urldecode: filename=urldecode-0.1-py3-none-any.whl size=1542 sha256=c8232a954a3088bf9ea21464ebb8e56535bac1457c63d3bf6e5c2687ce586827
  Stored in directory: /Users/fomotoshi/Library/Caches/pip/wheels/ef/18/4c/5581b56c92c24af5c2b72d13faeaa26ac5c4ee23ea011a7a2c
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491070 sha256=3c2a1ec87b337aebcb4f5377bc8015f96ca92658f469a69fc43618ff2301afc6
  Stored in directory: /Users/fomotoshi/Library/Caches/pip/wheels/22/73/06/557dc4f4ef68179b9d763930d6eec26b88ed7c389b19588a1c
  Building wheel for zope.interface (setup.py) ... done
  Created wheel for zope.interface: filename=zope.interface-5.4.0-cp310-cp310-macosx_12_0_arm64.whl size=208389 sha256=aeb4ea9b215fc82b77e063a2150ae8ddc91049a88aa5b56d8f3ad4086d535e75
  Stored in directory: /Users/fomotoshi/Library/Caches/pip/wheels/21/a9/8b/0bfc5594d8e109d5b25d6b69e0cff14d09d93e3522dcb16d2b
Successfully built bencoder.pyx pyaes urldecode future zope.interface
Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects
Joinmarket was not installed. Exiting.
@AdamISZ
Copy link
Member

AdamISZ commented Jan 5, 2022

So since you're installing on a Mac, I can't reproduce.

#include <openssl/opensslv.h>
           ^~~~~~~~~~~~~~~~~~~~
  1 error generated.

      =============================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.html for specific
         instructions for your platform.
      3) Check our frequently asked questions for more information:
         https://cryptography.io/en/latest/faq.html
      =============================DEBUG ASSISTANCE=============================

  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for cryptography

Have you tried those suggestions? I also suggest specifically ddg/googling the error i.e. "#include <openssl/opensslv.h>" with "macOS" and "python cryptography" or similar. But since you already have succeeded in installing it on the machine, it is indeed a non-trivial question .. at least to me.

@ChzenChzen
Copy link
Author

ChzenChzen commented Jan 5, 2022

@AdamISZ I installed cryptography package using pip for 3.10 python, 3.9 python without problem, problem with installation only when I use ./install.sh

python
Python 3.9.4 (default, Jan  5 2022, 19:08:01)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cryptography
>>> from cryptography.fernet import Fernet
>>> key = Fernet.generate_key()
>>> f = Fernet(key)
>>> token = f.encrypt(b"A really secret message. Not for prying eyes.")
>>> token
b'gAAAAABh1cuGVfSJErtPwSxaQcit0JMm4p-C-miGTdSh8ieExbBO9DOBt0oiLSmmQvbj5xoyknZ12Mvl3H1XLTDIHcSaKPrd-DnYIMlyuxqkDz6o2gO0wOANr4BCXsn1a9kTULZmvlT7'
>>> f.decrypt(token)
b'A really secret message. Not for prying eyes.'

@kristapsk
Copy link
Member

@ChzenChzen We have pinned cryptography to specific version 3.3.2 since v0.8.2 release, as they introduced Rust as a dependency which caused problems for 32-bit ARM (Raspberry Pi) users back then, see #805. You should try installing 3.3.2 specifically.

@ChzenChzen
Copy link
Author

ChzenChzen commented Jan 5, 2022

(jmvenv) ➜ joinmarket git:(master) pip install cryptography works fine, but if install from requirements it will fail. See below.

➜  joinmarket git:(master) virtualenv jmvenv --python=/Users/fomotoshi/.pyenv/shims/python3.9
created virtual environment CPython3.9.4.final.0-64 in 104ms
  creator CPython3Posix(dest=/Users/fomotoshi/Documents/joinmarket/jmvenv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/fomotoshi/Library/Application Support/virtualenv)
    added seed packages: pip==21.3.1, setuptools==60.2.0, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
➜  joinmarket git:(master) source jmvenv/bin/activate
(jmvenv) ➜  joinmarket git:(master) pip install -r requirements/base.txt
Obtaining file:///Users/fomotoshi/Documents/joinmarket/jmbase (from -r requirements/base.txt (line 1))
  Preparing metadata (setup.py) ... done
Obtaining file:///Users/fomotoshi/Documents/joinmarket/jmbitcoin (from -r requirements/base.txt (line 2))
  Preparing metadata (setup.py) ... done
Obtaining file:///Users/fomotoshi/Documents/joinmarket/jmclient (from -r requirements/base.txt (line 3))
  Preparing metadata (setup.py) ... done
Obtaining file:///Users/fomotoshi/Documents/joinmarket/jmdaemon (from -r requirements/base.txt (line 4))
  Preparing metadata (setup.py) ... done
Collecting twisted==21.7.0
  Using cached Twisted-21.7.0-py3-none-any.whl (3.1 MB)
Collecting service-identity
  Using cached service_identity-21.1.0-py2.py3-none-any.whl (12 kB)
Collecting chromalog==1.0.5
  Using cached chromalog-1.0.5-py2.py3-none-any.whl (10 kB)
Collecting colorama>=0.3.7
  Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting six<2,>=1.9.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting future>=0.14.3
  Using cached future-0.18.2-py3-none-any.whl
Collecting typing-extensions>=3.6.5
  Using cached typing_extensions-4.0.1-py3-none-any.whl (22 kB)
Collecting Automat>=0.8.0
  Using cached Automat-20.2.0-py2.py3-none-any.whl (31 kB)
Collecting hyperlink>=17.1.1
  Using cached hyperlink-21.0.0-py2.py3-none-any.whl (74 kB)
Collecting incremental>=21.3.0
  Using cached incremental-21.3.0-py2.py3-none-any.whl (15 kB)
Collecting attrs>=19.2.0
  Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting zope.interface>=4.4.2
  Using cached zope.interface-5.4.0-cp39-cp39-macosx_12_0_arm64.whl
Collecting constantly>=15.1
  Using cached constantly-15.1.0-py2.py3-none-any.whl (7.9 kB)
Collecting python-bitcointx>=1.1.1.post0
  Using cached python_bitcointx-1.1.2-py3-none-any.whl (191 kB)
Collecting pyaes
  Using cached pyaes-1.6.1-py3-none-any.whl
Collecting urldecode
  Using cached urldecode-0.1-py3-none-any.whl
Collecting mnemonic
  Using cached mnemonic-0.20-py3-none-any.whl (62 kB)
Collecting argon2_cffi
  Using cached argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Collecting bencoder.pyx>=2.0.0
  Using cached bencoder.pyx-3.0.0-cp39-cp39-macosx_12_0_arm64.whl
Collecting klein==20.6.0
  Using cached klein-20.6.0-py2.py3-none-any.whl (118 kB)
Collecting pyjwt==2.1.0
  Using cached PyJWT-2.1.0-py3-none-any.whl (16 kB)
Collecting autobahn==20.12.3
  Using cached autobahn-20.12.3-py2.py3-none-any.whl (1.5 MB)
Collecting txaio>=20.4.1
  Using cached txaio-21.2.1-py2.py3-none-any.whl (30 kB)
Collecting cryptography>=2.9.2
  Using cached cryptography-36.0.1-cp36-abi3-macosx_10_10_universal2.whl (4.8 MB)
Collecting Tubes
  Using cached Tubes-0.2.0-py2.py3-none-any.whl (58 kB)
Collecting Werkzeug
  Using cached Werkzeug-2.0.2-py3-none-any.whl (288 kB)
Collecting txtorcon
  Using cached txtorcon-21.1.0-py2.py3-none-any.whl (260 kB)
Collecting cryptography>=2.9.2
  Using cached cryptography-3.3.2.tar.gz (539 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pyopenssl
  Using cached pyOpenSSL-21.0.0-py2.py3-none-any.whl (55 kB)
Collecting libnacl
  Using cached libnacl-1.8.0-py2.py3-none-any.whl (20 kB)
Collecting cffi>=1.12
  Using cached cffi-1.15.0-cp39-cp39-macosx_11_0_arm64.whl (173 kB)
Collecting argon2-cffi-bindings
  Using cached argon2_cffi_bindings-21.2.0-cp38-abi3-macosx_10_9_universal2.whl (53 kB)
Collecting pyasn1
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting pyasn1-modules
  Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting idna>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Requirement already satisfied: setuptools in ./jmvenv/lib/python3.9/site-packages (from zope.interface>=4.4.2->twisted==21.7.0->joinmarketbase==0.9.5.dev0->-r requirements/base.txt (line 1)) (60.2.0)
Collecting characteristic
  Using cached characteristic-14.3.0-py2.py3-none-any.whl (15 kB)
Building wheels for collected packages: cryptography
  Building wheel for cryptography (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/fomotoshi/Documents/joinmarket/jmvenv/bin/python /Users/fomotoshi/Documents/joinmarket/jmvenv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/d2/r3gzsqg56hz_r56kkxzfkbb40000gn/T/tmp3i1pnnkp
       cwd: /private/var/folders/d2/r3gzsqg56hz_r56kkxzfkbb40000gn/T/pip-install-4bsx047n/cryptography_e91ee90a878444dc87c0e424f564dc66
  Complete output (138 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-12.1-arm64-3.9
  creating build/lib.macosx-12.1-arm64-3.9/cryptography
  copying src/cryptography/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography
  copying src/cryptography/utils.py -> build/lib.macosx-12.1-arm64-3.9/cryptography
  copying src/cryptography/__about__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography
  copying src/cryptography/exceptions.py -> build/lib.macosx-12.1-arm64-3.9/cryptography
  copying src/cryptography/fernet.py -> build/lib.macosx-12.1-arm64-3.9/cryptography
  creating build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat
  copying src/cryptography/hazmat/_der.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat
  copying src/cryptography/hazmat/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat
  copying src/cryptography/hazmat/_oid.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat
  creating build/lib.macosx-12.1-arm64-3.9/cryptography/x509
  copying src/cryptography/x509/oid.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/x509
  copying src/cryptography/x509/ocsp.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/x509
  copying src/cryptography/x509/general_name.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/x509
  copying src/cryptography/x509/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/x509
  copying src/cryptography/x509/extensions.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/x509
  copying src/cryptography/x509/name.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/x509
  copying src/cryptography/x509/base.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/x509
  copying src/cryptography/x509/certificate_transparency.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/x509
  creating build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends
  copying src/cryptography/hazmat/backends/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends
  creating build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives
  copying src/cryptography/hazmat/primitives/padding.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives
  creating build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/bindings
  copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/bindings
  creating build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ocsp.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/backends/openssl
  creating build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/kdf
  copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/kdf
  creating build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/twofactor
  copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/twofactor
  creating build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/serialization
  copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/serialization
  creating build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/ciphers
  copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/ciphers
  creating build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/asymmetric
  copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/primitives/asymmetric
  creating build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/bindings/openssl
  copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.macosx-12.1-arm64-3.9/cryptography/hazmat/bindings/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 'rtd-requirements.txt'
  warning: no previously-included files found matching 'tox.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'
  running build_ext
  creating build/temp.macosx-12.1-arm64-3.9
  creating build/temp.macosx-12.1-arm64-3.9/build
  creating build/temp.macosx-12.1-arm64-3.9/build/temp.macosx-12.1-arm64-3.9
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/fomotoshi/Documents/joinmarket/jmvenv/include -I/Users/fomotoshi/.pyenv/versions/3.9.4/include/python3.9 -c build/temp.macosx-12.1-arm64-3.9/_openssl.c -o build/temp.macosx-12.1-arm64-3.9/build/temp.macosx-12.1-arm64-3.9/_openssl.o -Wconversion -Wno-error=sign-conversion
  build/temp.macosx-12.1-arm64-3.9/_openssl.c:575:10: fatal error: 'openssl/opensslv.h' file not found
  #include <openssl/opensslv.h>
           ^~~~~~~~~~~~~~~~~~~~
  1 error generated.

      =============================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.html for specific
         instructions for your platform.
      3) Check our frequently asked questions for more information:
         https://cryptography.io/en/latest/faq.html
      =============================DEBUG ASSISTANCE=============================

  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------
  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
(jmvenv) ➜  joinmarket git:(master) pip install cryptography
Collecting cryptography
  Using cached cryptography-36.0.1-cp36-abi3-macosx_10_10_universal2.whl (4.8 MB)
Collecting cffi>=1.12
  Using cached cffi-1.15.0-cp39-cp39-macosx_11_0_arm64.whl (173 kB)
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Installing collected packages: pycparser, cffi, cryptography
Successfully installed cffi-1.15.0 cryptography-36.0.1 pycparser-2.21

@AdamISZ
Copy link
Member

AdamISZ commented Jan 5, 2022

@kristapsk

We have pinned cryptography to specific version 3.3.2 since v0.8.2 release, as they introduced Rust as a dependency which caused problems for 32-bit ARM (Raspberry Pi) users back then, see #805. You should try installing 3.3.2 specifically.

Thanks for remembering that, but: isn't it the opposite? If he can install latest cryptography package, separate from our install, but our install fails, isn't it presumably the pinned version that isn't working, so if he removes the pin, it should work?

@kristapsk
Copy link
Member

@AdamISZ That was suggested by me as a test. If latest works and 3.3.2 not, we have a problem. Need to find a solution that works for everyone.

@ChzenChzen I meant, could you try pip install cryptography==3.3.2?

@ChzenChzen
Copy link
Author

ChzenChzen commented Jan 5, 2022

@kristapsk (jmvenv) ➜ requirements git:(master) pip install cryptography==3.3.2 produces the same error.

@AdamISZ
Copy link
Member

AdamISZ commented Jan 5, 2022

@AdamISZ That was suggested by me as a test. If latest works and 3.3.2 not, we have a problem. Need to find a solution that works for everyone.

Understood.

@ChzenChzen if i could suggest the opposite test, remove ==3.3.2 from jmdaemon/setup.py and see if it works. I think we are expecting it would work, though ofc I agree with @kristapsk that this is not a solution for the project.

@ChzenChzen
Copy link
Author

thx you all, it solves the problem

@kristapsk
Copy link
Member

This should not be closed, as problem still exists with current master. We should figure out proper solution here.

@kristapsk kristapsk reopened this Jan 5, 2022
@AdamISZ
Copy link
Member

AdamISZ commented Jan 5, 2022

Agreed, problem isn't solved.

Right now I don't know how it's done apart from something janky like 'if darwin then don't pin', which is just .. dumb, kinda.

@ChzenChzen
Copy link
Author

@kristapsk @AdamISZ

look

(jmvenv) ➜  scripts git:(master) ✗ python wallet-tool.py generate
User data location: /Users/fomotoshi/Library/Application support/joinmarket/
Would you like to use a two-factor mnemonic recovery phrase? write 'n' if you don't know what this is (y/n): n
Not using mnemonic extension
Enter new passphrase to encrypt wallet:
Reenter new passphrase to encrypt wallet:
Input wallet file name (default: wallet.jmdat): fakewallet.jmdat
Would you like this wallet to support fidelity bonds? write 'n' if you don't know what this is (y/n): n
Not supporting fidelity bonds
Traceback (most recent call last):
  File "/Users/fomotoshi/.pyenv/versions/3.9.4/lib/python3.9/hashlib.py", line 160, in __hash_new
    return _hashlib.new(name, data, **kwargs)
ValueError: [digital envelope routines] initialization error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/fomotoshi/Documents/joinmarket/scripts/wallet-tool.py", line 6, in <module>
    jmprint(wallet_tool_main("wallets"), "success")
  File "/Users/fomotoshi/Documents/joinmarket/jmclient/jmclient/wallet_utils.py", line 1584, in wallet_tool_main
    retval = wallet_generate_recover("generate", wallet_root_path,
  File "/Users/fomotoshi/Documents/joinmarket/jmclient/jmclient/wallet_utils.py", line 702, in wallet_generate_recover
    return wallet_generate_recover_bip39(method, walletspath,
  File "/Users/fomotoshi/Documents/joinmarket/jmclient/jmclient/wallet_utils.py", line 688, in wallet_generate_recover_bip39
    wallet = create_wallet(wallet_path, password, mixdepth, wallet_cls,
  File "/Users/fomotoshi/Documents/joinmarket/jmclient/jmclient/wallet_utils.py", line 1371, in create_wallet
    return wallet_cls(storage)
  File "/Users/fomotoshi/Documents/joinmarket/jmclient/jmclient/wallet.py", line 1723, in __init__
    super().__init__(storage, **kwargs)
  File "/Users/fomotoshi/Documents/joinmarket/jmclient/jmclient/wallet.py", line 1128, in __init__
    super().__init__(storage, **kwargs)
  File "/Users/fomotoshi/Documents/joinmarket/jmclient/jmclient/wallet.py", line 1434, in __init__
    super().__init__(storage, **kwargs)
  File "/Users/fomotoshi/Documents/joinmarket/jmclient/jmclient/wallet.py", line 1990, in __init__
    self._key_ident = self._get_key_ident()
  File "/Users/fomotoshi/Documents/joinmarket/jmclient/jmclient/wallet.py", line 2034, in _get_key_ident
    self.get_bip32_priv_export(0, self.BIP32_EXT_ID).encode('ascii')).digest())\
  File "/Users/fomotoshi/Documents/joinmarket/jmclient/jmclient/wallet.py", line 2220, in get_bip32_priv_export
    return self._ENGINE.derive_bip32_priv_export(self._master_key, path)
  File "/Users/fomotoshi/Documents/joinmarket/jmclient/jmclient/cryptoengine.py", line 173, in derive_bip32_priv_export
    return btc.bip32_serialize(cls._walk_bip32_path(master_key, path))
  File "/Users/fomotoshi/Documents/joinmarket/jmclient/jmclient/cryptoengine.py", line 183, in _walk_bip32_path
    cls.__LRU_KEY_CACHE[(key, lvl)] = btc.raw_bip32_ckd(key, lvl)
  File "/Users/fomotoshi/Documents/joinmarket/jmbitcoin/jmbitcoin/secp256k1_deterministic.py", line 28, in raw_bip32_ckd
    pub = privtopub(key)
  File "/Users/fomotoshi/Documents/joinmarket/jmbitcoin/jmbitcoin/secp256k1_main.py", line 72, in privkey_to_pubkey
    newpriv = CKey(priv, compressed=compressed)
  File "/Users/fomotoshi/Documents/joinmarket/jmvenv/lib/python3.9/site-packages/bitcointx/core/key.py", line 189, in __init__
    self.__pub = CPubKey._from_ctypes_char_array(
  File "/Users/fomotoshi/Documents/joinmarket/jmvenv/lib/python3.9/site-packages/bitcointx/core/key.py", line 425, in _from_ctypes_char_array
    return cls(pub.raw[:pub_size0.value])
  File "/Users/fomotoshi/Documents/joinmarket/jmvenv/lib/python3.9/site-packages/bitcointx/core/key.py", line 408, in __new__
    self.__key_id = bitcointx.core.Hash160(self)
  File "/Users/fomotoshi/Documents/joinmarket/jmvenv/lib/python3.9/site-packages/bitcointx/core/serialize.py", line 51, in Hash160
    h = hashlib.new('ripemd160')
  File "/Users/fomotoshi/.pyenv/versions/3.9.4/lib/python3.9/hashlib.py", line 166, in __hash_new
    return __get_builtin_constructor(name)(data)
  File "/Users/fomotoshi/.pyenv/versions/3.9.4/lib/python3.9/hashlib.py", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type ripemd160

@kristapsk
Copy link
Member

@ChzenChzen That's different issue, OpenSSL has deprecated RIPEMD160 and removed from the latest versions by default. Will be solved with python-bitcointx next release, see Simplexum/python-bitcointx#64 (solution is already in their master branch, but we need new release to upgrade, which will also, hopefully, come with send to P2TR bech32m taproot addresses). Until then, you can try downgrading OpenSSL on your system or build it manually with RIPEMD160 enabled (can't give direct hints how to do that, I'm no expert with Mac's).

@ChzenChzen
Copy link
Author

ChzenChzen commented Jan 12, 2022

@kristapsk
Copy link
Member

@ChzenChzen I hope next release of python-bitcointx will be out soon and we will avoid recommending difficult solutions for JM users.

@AdamISZ
Copy link
Member

AdamISZ commented Feb 16, 2022

@kristapsk can you summarize to what extent merge of #1181 should have solved the problem in this thread?

@kristapsk
Copy link
Member

@AdamISZ It doesn't rely on OpenSSL for RIPEMD160 anymore, which is disabled by default in newer OpenSSL versions.

@kristapsk
Copy link
Member

@AdamISZ But that only solves second issue (ripemd160), but not first (install of cryptography failing).

@kristapsk
Copy link
Member

Looks we may have problem with macOS on aarch64 specifically, #1400 is similar. Don't think we can add this to CI, as ARM tests are failing currently.

@kristapsk
Copy link
Member

Is this still an issue?

@kristapsk
Copy link
Member

Closing as old. Reopen or open new if it's still an issue.

@openoms
Copy link
Contributor

openoms commented Mar 10, 2024

Seeing this problem again on 32bit arm Odroid XU4. Testing is limited as I am about to migrate away out from this board.

uname -a
Linux odroidxu4 4.14.222-odroidxu4 #1 SMP PREEMPT Mon Nov 22 12:13:27 UTC 2021 armv7l GNU/Linux 
      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.10.4
          platform: Linux-4.14.222-odroidxu4-armv7l-with-glibc2.28
          pip: n/a
          setuptools: 69.1.1
          setuptools_rust: 1.9.0
          rustc: n/a
          =============================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.56.0.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cryptography

@kristapsk
Copy link
Member

kristapsk commented Mar 10, 2024

@openoms Yes, you need to have Rust compiler installed locally to build cryptography on 32-bit platforms now, as there are no pre-build wheels provided for recent versions. Decision was made some time ago do drop official support for 32-bit because it had become more and more a maintenance burden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants