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

Cannot install pytezos on Python 3.12 - issue with dependency secp256k1 #370

Open
hoh opened this issue Jun 25, 2024 · 0 comments
Open

Cannot install pytezos on Python 3.12 - issue with dependency secp256k1 #370

hoh opened this issue Jun 25, 2024 · 0 comments

Comments

@hoh
Copy link

hoh commented Jun 25, 2024

I am reopening #360 due to secp256k1 causing issues when using Python 3.12 on, at least, Ubuntu 24.04 and Debian 12.

I created an isolated test for this issue using containers with the relevant Dockerfile content below.
These containers fail to build with the same error output I faced on plain Ubuntu 24.04 systems.

This prevents users from using any project that depends on pytezos on recent distributions, which is quite problematic.

It appears that the issue is due to the dependency on the secp256k1 library, which appears unmaintained (last update in 2021). I looked at the network of forks on GitHub and found no help there.

As mentioned in by @droserasprout in #360: "coincurve is nice and well-maintained; we should definitely make a switch. But this library not a drop-in replacement, so it's not an instant task.

docker build -t pytezos -f Dockerfile . 

Using Ubuntu 24.04:

FROM ubuntu:24.04

RUN apt-get update && apt-get install -y \
    python3 \
    python3-pip \
    python3-venv \
    libsecp256k1-dev \
    git \
    && rm -rf /var/lib/apt/lists/*

# Use virtual environment to preserve system libraries
RUN python3 -m venv /opt/venv
RUN /opt/venv/bin/python -m pip install --upgrade "pytezos==3.13.1"

Using Debian 12 / Python 3.12:

FROM python:3.12-bookworm

RUN apt-get update && apt-get install -y \
    python3 \
    python3-pip \
    python3-venv \
    libsecp256k1-dev \
    git \
    && rm -rf /var/lib/apt/lists/*

# Use virtual environment to preserve system libraries
RUN python3 -m venv /opt/venv
RUN /opt/venv/bin/python -m pip install --upgrade "pytezos==3.13.1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant