Ошибка при установке библиотеки secp256k1 в Windows - PullRequest
0 голосов
/ 18 мая 2018

Я пытаюсь установить библиотеку secp256k1 на 64-разрядную машину Windows 10 и получаю следующую ошибку

C:\Users\user\Downloads\http-ftp>pip3 install secp256k1
Collecting secp256k1
  Using cached https://files.pythonhosted.org/packages/52/62/d7bf3829e126e517e253d2e22a63511c54bbaac34d7ddea316cde040fc49/secp256k1-0.13.2.tar.gz
Requirement already satisfied: cffi>=1.3.0 in c:\users\user\appdata\local\programs\python\python36\lib\site-packages (from secp256k1) (1.11.5)
Requirement already satisfied: pycparser in c:\users\user\appdata\local\programs\python\python36\lib\site-packages (from cffi>=1.3.0->secp256k1) (2.18)
Building wheels for collected packages: secp256k1
  Running setup.py bdist_wheel for secp256k1 ... error
  Complete output from command c:\users\user\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-ewfjmjoy\\secp256k1\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\user\AppData\Local\Temp\pip-wheel-p9ijp41o --python-tag cp36:
  0.28
  Using bundled libsecp256k1
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\secp256k1
  copying secp256k1\__init__.py -> build\lib.win-amd64-3.6\secp256k1
  copying secp256k1\__main__.py -> build\lib.win-amd64-3.6\secp256k1
  running build_clib
  error: [WinError 193] %1 is not a valid Win32 application

  ----------------------------------------
  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
    Complete output from command c:\users\user\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-ewfjmjoy\\secp256k1\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\user\AppData\Local\Temp\pip-record-y6bxnsr0\install-record.txt --single-version-externally-managed --compile:
    0.28
    Using bundled libsecp256k1
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\secp256k1
    copying secp256k1\__init__.py -> build\lib.win-amd64-3.6\secp256k1
    copying secp256k1\__main__.py -> build\lib.win-amd64-3.6\secp256k1
    running build_clib
    error: [WinError 193] %1 is not a valid Win32 application

    ----------------------------------------
Command "c:\users\user\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-ewfjmjoy\\secp256k1\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\user\AppData\Local\Temp\pip-record-y6bxnsr0\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-install-ewfjmjoy\secp256k1\

Есть предложения, что может быть не так и как это исправить?Я также пытался с pip3 и easy_install, но, похоже, ничего не работает.

1 Ответ

0 голосов
/ 16 марта 2019

Вы можете использовать это: https://github.com/jhtitor/secp256k1prp-py

из хранилища. README:

Windows 7+

install .NET Framework 4.6 or higher
install Visual C++ 14.0 from "Microsoft Visual C++ Build Tools"
install python 3.6.5 or later
Note: for python 3.5 builds, download and install Visual Studio 2015

Затем попробуйте установить его снова

...