Error message when trying to install: https://pypi.org/project/secp256k1/
pip install secp256k1
into a virtual environment on a windows 10 system, date 2023-01-06. Looking for a solution to this problem, possible solution found below error message.
pip install secp256k1
Collecting secp256k1
Using cached secp256k1-0.14.0.tar.gz (2.4 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: cffi>=1.3.0 in c:\[...]\nostr\.virtenv\lib\site-packages (from secp256k1) (1.15.1)
Requirement already satisfied: pycparser in c:\[...]\nostr\.virtenv\lib\site-packages (from cffi>=1.3.0->secp256k1) (2.21)
Building wheels for collected packages: secp256k1
Building wheel for secp256k1 (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
1.8.0
C:[...]\nostr\.virtenv\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
Using bundled libsecp256k1
running bdist_wheel
The [wheel] section is deprecated. Use [bdist_wheel] instead.
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\secp256k1
copying secp256k1\__init__.py -> build\lib.win-amd64-cpython-310\secp256k1
copying secp256k1\__main__.py -> build\lib.win-amd64-cpython-310\secp256k1
running build_clib
Building experimental
error: [WinError 193] %1 is not a valid Win32 application
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for secp256k1
Running setup.py clean for secp256k1
Failed to build secp256k1
Installing collected packages: secp256k1
Running setup.py install for secp256k1 ... error
error: subprocess-exited-with-error
× Running setup.py install for secp256k1 did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
1.8.0
C:\[...]\nostr\.virtenv\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
Using bundled libsecp256k1
running install
C:\[...]\nostr\.virtenv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\secp256k1
copying secp256k1\__init__.py -> build\lib.win-amd64-cpython-310\secp256k1
copying secp256k1\__main__.py -> build\lib.win-amd64-cpython-310\secp256k1
running build_clib
Building experimental
error: [WinError 193] %1 is not a valid Win32 application
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> secp256k1
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Lookinto installing this instead: https://pypi.org/project/coincurve/
pip install coincurve
It's Windows 7+ tested according to it's web page, but you'll need to alter your code to call it from this package instead of "secp256k1" that's only macOS and Linux compatible.