[GH-ISSUE #150] bug: cryptography 49.0.0 Rust bindings fail at runtime on Python 3.14 (Termux/Android) #75

Closed
opened 2026-10-18 14:02:39 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @akopper on GitHub (Jul 16, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/150

First off: thank you! 🙏

I just want to say — cptr is incredible. I use it every single day and I absolutely love it. Being able to turn any device into a full workstation accessible from a browser is genuinely game-changing. The mobile-first UI, the persistent terminal, the AI agent with tool calling — it all just works beautifully. Huge thanks to the whole team behind this.

The problem

When running cptr on Android via Termux with Python 3.14, cptr crashes at startup with an ImportError from the cryptography dependency.

The installation of cryptography 49.0.0 succeeds fine — the problem is at runtime, not build time. The pre-built Rust bindings (_rust.abi3.so) shipped with cryptography 49.0.0 reference the C-API symbol PyExc_Warning, which was removed in Python 3.14. This causes a dlopen failure when cptr tries to import cryptography.

Environment

  • OS: Android (via Termux)
  • Arch: ARM (aarch64)
  • Python: 3.14 (Termux)
  • cptr: 0.9.8
  • cryptography: 49.0.0

Error

$ cptr run --host 127.0.0.1 --headless

Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/cptr", line 6, in <module>
    sys.exit(main())
  ...
  File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/cptr/utils/config.py", line 14, in <module>
    import jwt  # PyJWT
  File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/jwt/__init__.py", line 1, in <module>
    from .api_jwk import PyJWK, PyJWKSet
  File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/jwt/api_jwk.py", line 8, in <module>
    from .algorithms import get_default_algorithms, has_crypto, requires_cryptography
  File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/jwt/algorithms.py", line 23, in <module>
    from .utils import (...)
  File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/jwt/utils.py", line 7, in <module>
    from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve
  File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/cryptography/hazmat/primitives/asymmetric/ec.py", line 11, in <module>
    from cryptography.exceptions import UnsupportedAlgorithm, _Reasons
  File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/cryptography/exceptions.py", line 9, in <module>
    from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions
ImportError: dlopen failed: cannot locate symbol "PyExc_Warning" referenced by
"/data/data/com.termux/files/usr/lib/python3.14/site-packages/cryptography/hazmat/bindings/_rust.abi3.so"

Root cause

The PyExc_Warning C-API symbol was removed in Python 3.14 (it was deprecated and replaced by PyExc_DeprecationWarning etc. in the stable ABI). The pre-built _rust.abi3.so in cryptography 49.0.0 still references this symbol, causing a dlopen failure on Python 3.14.

Note: pip install --force-reinstall --no-binary cryptography cryptography did not fix the issue — pip still used a cached wheel and reinstalled 49.0.0, which has the same problem.

The workaround

Pinning cryptography to 43.0.1 resolves the issue — its Rust bindings do not reference PyExc_Warning:

pip install cryptography==43.0.1
pip install cptr

cptr works perfectly fine with cryptography 43.0.1 — no issues at all.

Thanks again for this amazing project — it has become an essential part of my daily workflow. 🚀

Originally created by @akopper on GitHub (Jul 16, 2026). Original GitHub issue: https://github.com/open-webui/computer/issues/150 ## First off: thank you! 🙏 I just want to say — **cptr is incredible**. I use it every single day and I absolutely love it. Being able to turn any device into a full workstation accessible from a browser is genuinely game-changing. The mobile-first UI, the persistent terminal, the AI agent with tool calling — it all just works beautifully. Huge thanks to the whole team behind this. ## The problem When running cptr on **Android via Termux** with **Python 3.14**, cptr crashes at startup with an `ImportError` from the `cryptography` dependency. The installation of `cryptography` 49.0.0 succeeds fine — the problem is at **runtime**, not build time. The pre-built Rust bindings (`_rust.abi3.so`) shipped with cryptography 49.0.0 reference the C-API symbol `PyExc_Warning`, which was **removed in Python 3.14**. This causes a `dlopen` failure when cptr tries to import `cryptography`. ### Environment - **OS:** Android (via Termux) - **Arch:** ARM (aarch64) - **Python:** 3.14 (Termux) - **cptr:** 0.9.8 - **cryptography:** 49.0.0 ### Error ``` $ cptr run --host 127.0.0.1 --headless Traceback (most recent call last): File "/data/data/com.termux/files/usr/bin/cptr", line 6, in <module> sys.exit(main()) ... File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/cptr/utils/config.py", line 14, in <module> import jwt # PyJWT File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/jwt/__init__.py", line 1, in <module> from .api_jwk import PyJWK, PyJWKSet File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/jwt/api_jwk.py", line 8, in <module> from .algorithms import get_default_algorithms, has_crypto, requires_cryptography File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/jwt/algorithms.py", line 23, in <module> from .utils import (...) File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/jwt/utils.py", line 7, in <module> from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/cryptography/hazmat/primitives/asymmetric/ec.py", line 11, in <module> from cryptography.exceptions import UnsupportedAlgorithm, _Reasons File "/data/data/com.termux/files/usr/lib/python3.14/site-packages/cryptography/exceptions.py", line 9, in <module> from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions ImportError: dlopen failed: cannot locate symbol "PyExc_Warning" referenced by "/data/data/com.termux/files/usr/lib/python3.14/site-packages/cryptography/hazmat/bindings/_rust.abi3.so" ``` ### Root cause The `PyExc_Warning` C-API symbol was removed in Python 3.14 (it was deprecated and replaced by `PyExc_DeprecationWarning` etc. in the stable ABI). The pre-built `_rust.abi3.so` in cryptography 49.0.0 still references this symbol, causing a `dlopen` failure on Python 3.14. Note: `pip install --force-reinstall --no-binary cryptography cryptography` did **not** fix the issue — pip still used a cached wheel and reinstalled 49.0.0, which has the same problem. ## The workaround Pinning `cryptography` to **43.0.1** resolves the issue — its Rust bindings do not reference `PyExc_Warning`: ```bash pip install cryptography==43.0.1 pip install cptr ``` cptr works perfectly fine with cryptography 43.0.1 — no issues at all. Thanks again for this amazing project — it has become an essential part of my daily workflow. 🚀
Author
Owner

@owui-terminator[bot] commented on GitHub (Jul 16, 2026):

⚠️ Missing Issue Title Prefix

@akopper, your issue title is missing a categorising prefix (e.g. bug:, feat:, docs:).

Please update the title to lead with one of:

  • bug: bug report or error
  • feat: feature request or enhancement
  • docs: documentation issue
  • question: usage question
  • help: support request

Example: bug: Login fails when the password contains special characters

<!-- gh-comment-id:4996736944 --> @owui-terminator[bot] commented on GitHub (Jul 16, 2026): # ⚠️ Missing Issue Title Prefix @akopper, your issue title is missing a categorising prefix (e.g. `bug:`, `feat:`, `docs:`). Please update the title to lead with one of: - **bug**: bug report or error - **feat**: feature request or enhancement - **docs**: documentation issue - **question**: usage question - **help**: support request Example: `bug: Login fails when the password contains special characters`
Author
Owner

@tjbck commented on GitHub (Jul 18, 2026):

Should be addressed! Appreciate the kind words!

<!-- gh-comment-id:5010223273 --> @tjbck commented on GitHub (Jul 18, 2026): Should be addressed! Appreciate the kind words!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/computer#75
No description provided.