Skip to content

ImportError: dlopen failed: cannot locate symbol "_Py_NoneStruct" #200

Description

@lunart888

Hi ofek,

I'm getting the following error when trying to use the bit library in Termux:

Traceback (most recent call last): File "<string>", line 1, in <module> File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/bit/__init__.py", line 1, in <module> from bit.format import verify_sig File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/bit/format.py", line 1, in <module> from coincurve import verify_signature as _vs File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/coincurve/__init__.py", line 1, in <module> from coincurve.context import GLOBAL_CONTEXT, Context File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/coincurve/context.py", line 5, in <module> from coincurve.flags import CONTEXT_FLAGS, CONTEXT_NONE File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/coincurve/flags.py", line 1, in <module> from ._libsecp256k1 import lib ImportError: dlopen failed: cannot locate symbol "_Py_NoneStruct" referenced by "/data/data/com.termux/files/usr/lib/python3.12/site-packages/coincurve/_libsecp256k1.cpython-312.so"...

Steps to Reproduce:

  1. Install bit in Termux:
    bash
    pip install bit

  2. Run:
    bash
    python -c 'from bit import Key'

Environment:

  • Termux on Android aarch64
  • Python 3.12

What I’ve Tried:

  1. Reinstalling bit and coincurve.
  2. Installing libsecp256k1.

Please help fix this issue or suggest a workaround for Python 3.12.

Thank you!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions