python-nostr icon indicating copy to clipboard operation
python-nostr copied to clipboard

Also unable to install. 'pip install nostr' fails

Open OkieDokieThen opened this issue 2 years ago • 5 comments

`(base) C:\Repository>pip install nostr Collecting nostr Using cached nostr-0.0.2-py3-none-any.whl (15 kB) Requirement already satisfied: cffi>=1.15.0 in c:\users\myname\appdata\local\miniconda3\lib\site-packages (from nostr) (1.15.1) Requirement already satisfied: cryptography>=37.0.4 in c:\users\myname\appdata\local\miniconda3\lib\site-packages (from nostr) (39.0.1) Requirement already satisfied: pycparser>=2.21 in c:\users\myname\appdata\local\miniconda3\lib\site-packages (from nostr) (2.21) Collecting secp256k1>=0.14.0 (from nostr) Using cached secp256k1-0.14.0.tar.gz (2.4 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [1 lines of output] 'pkg-config' is required to install this package. Please see the README for details. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.`

OkieDokieThen avatar Aug 19 '23 01:08 OkieDokieThen

I messed around with trying to install 'pkg-config' and adding it to my path, but that didn't seem to help. What is going on?

OkieDokieThen avatar Aug 19 '23 02:08 OkieDokieThen

I was able to install pkg-config using miniconda

conda create -n myenv python=3.9
conda activate myenv
conda install -c conda-forge pkg-config
pip install --use-pep517 nostr==0.0.2

asherp avatar Oct 31 '23 20:10 asherp

Check this Dockerfile https://github.com/raymonostr/nip57-server/blob/main/Dockerfile - you need pkg-config and build-essential to build the secp256k1

raymonostr avatar Nov 20 '23 08:11 raymonostr

I got a similar issue from a Docker container, I fixed it with those packages installation:

RUN apt-get update && apt-get install -y pkg-config libsecp256k1-dev build-essential

cromatikap avatar Nov 29 '23 13:11 cromatikap

On Mac you can do brew install pkgconfig

teqquu-official avatar Jan 20 '24 04:01 teqquu-official