grinventions / mimblewimble-py

Pure Python implementation of Mimblewimble protocol for Grin cryptocurrency
MIT License
18 stars 6 forks source link

Error when using pip install mimblewimble: secp256k1-zkp-mw: finished with status 'error' #10

Open Anynomouss opened 4 months ago

Anynomouss commented 4 months ago

I get this error when installing using pip on Linux subsytems for Windows:

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-1kcu0m6s/coincurve/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-urtrob43-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-1kcu0m6s/coincurve/
It is rather non-descriptive unfortunately.

I also got prolblems when installing on Windows using pip:

 cl : Command line warning D9002 : ignoring unknown option '-g'
      lax_der_parsing.c
      C:\Users\anynomous\AppData\Local\Temp\pip-install-gvvmq687\secp256k1-zkp-mw_7295ed43b1404a1ebebb32e7f9dd4b2d\secp256k1-zkp\contrib\lax_der_parsing.c : fatal error C1083: Cannot open compiler generated file: '': Invalid argument
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for secp256k1-zkp-mw
  Building wheel for siphash-cffi (pyproject.toml) ... done
  Created wheel for siphash-cffi: filename=siphash_cffi-0.1.4-cp310-cp310-win_amd64.whl size=30033 sha256=34b2821df53c4fd8579d7cc51de931c98ab0b3da6ba8d97ed7b3f9fdead35a3b
  Stored in directory: c:\users\anynomous\appdata\local\pip\cache\wheels\0d\66\19\7e6e26301164ccb69e11e790755ef7313c0c078e1f5b47716a
Successfully built siphash-cffi
Failed to build secp256k1-zkp-mw
ERROR: Could not build wheels for secp256k1-zkp-mw, which is required to install pyproject.toml-based projects

I tried alternative way of installing, installing secp256k1-zkp-mw like this worked

cd secp256k1-zkp-mw
git submodule init
git submodule update
pip3 install .

Installing mimblewimble-py like this did unfortunately not work.

git clone https://github.com/grinventions/mimblewimble-py
cd mimblewimle-py
git submodule init
git submodule update
pip3 install .

Error:

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-insmsnl8/coincurve/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-dk383sh6-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-insmsnl8/coincurve/
marekyggdrasil commented 4 months ago

Hi!

Sorry you encountered build errors. Can you try the following way as a temp solution?

Start by installing secp256k1-zkp-mw as you did

cd secp256k1-zkp-mw
git submodule init
git submodule update
pip3 install .

then simply

pip3 install mimblewimble-py

I think it is the dependency secp256k1-zkp-mw that fails, but if already satisfied then mimblewimble-py should succeed normally.

This is just a temp solution, let me know if it worked out for you.