ethereum / eth-keys

A common API for Ethereum key operations.
MIT License
159 stars 64 forks source link

Encountered error while trying to install package #88

Closed GWNdrew closed 2 years ago

GWNdrew commented 2 years ago

What was wrong?

pip install eth-keys Collecting eth-keys Using cached eth_keys-0.4.0-py3-none-any.whl (21 kB) Requirement already satisfied: eth-typing<4,>=3.0.0 in c:\users\xyz\appdata\local\programs\python\python310\lib\site-packages (from eth-keys) (3.0.0) Collecting eth-utils<3.0.0,>=2.0.0 Using cached eth_utils-2.0.0-py3-none-any.whl (24 kB) Requirement already satisfied: eth-hash<0.4.0,>=0.3.1 in c:\users\xyz\appdata\local\programs\python\python310\lib\site-packages (from eth-utils<3.0.0,>=2.0.0->eth-keys) (0.3.2) Collecting cytoolz<1.0.0,>=0.10.1 Using cached cytoolz-0.11.2.tar.gz (481 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: toolz>=0.8.0 in c:\users\xyz\appdata\local\programs\python\python310\lib\site-packages (from cytoolz<1.0.0,>=0.10.1->eth-utils<3.0.0,>=2.0.0->eth-keys) (0.11.2) Using legacy 'setup.py install' for cytoolz, since package 'wheel' is not installed. Installing collected packages: cytoolz, eth-utils, eth-keys Running setup.py install for cytoolz ... error error: subprocess-exited-with-error

× Running setup.py install for cytoolz did not run successfully. │ exit code: 1 ╰─> [49 lines of output] ALERT: Cython not installed. Building without Cython. running install running build running build_py creating build creating build\lib.win-amd64-3.10 creating build\lib.win-amd64-3.10\cytoolz copying cytoolz\compatibility.py -> build\lib.win-amd64-3.10\cytoolz copying cytoolz_signatures.py -> build\lib.win-amd64-3.10\cytoolz copying cytoolz_version.py -> build\lib.win-amd64-3.10\cytoolz copying cytoolz__init.py -> build\lib.win-amd64-3.10\cytoolz creating build\lib.win-amd64-3.10\cytoolz\curried copying cytoolz\curried\exceptions.py -> build\lib.win-amd64-3.10\cytoolz\curried copying cytoolz\curried\operator.py -> build\lib.win-amd64-3.10\cytoolz\curried copying cytoolz\curried\init.py -> build\lib.win-amd64-3.10\cytoolz\curried copying cytoolz\dicttoolz.pyx -> build\lib.win-amd64-3.10\cytoolz copying cytoolz\functoolz.pyx -> build\lib.win-amd64-3.10\cytoolz copying cytoolz\itertoolz.pyx -> build\lib.win-amd64-3.10\cytoolz copying cytoolz\recipes.pyx -> build\lib.win-amd64-3.10\cytoolz copying cytoolz\utils.pyx -> build\lib.win-amd64-3.10\cytoolz copying cytoolz\cpython.pxd -> build\lib.win-amd64-3.10\cytoolz copying cytoolz\dicttoolz.pxd -> build\lib.win-amd64-3.10\cytoolz copying cytoolz\functoolz.pxd -> build\lib.win-amd64-3.10\cytoolz copying cytoolz\itertoolz.pxd -> build\lib.win-amd64-3.10\cytoolz copying cytoolz\recipes.pxd -> build\lib.win-amd64-3.10\cytoolz copying cytoolz\utils.pxd -> build\lib.win-amd64-3.10\cytoolz copying cytoolz\init__.pxd -> build\lib.win-amd64-3.10\cytoolz creating build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\dev_skip_test.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_compatibility.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_curried.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_curried_toolzlike.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_dev_skip_test.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_dicttoolz.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_docstrings.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_doctests.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_embedded_sigs.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_functoolz.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_inspect_args.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_itertoolz.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_none_safe.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_recipes.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_serialization.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_signatures.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_tlz.py -> build\lib.win-amd64-3.10\cytoolz\tests copying cytoolz\tests\test_utils.py -> build\lib.win-amd64-3.10\cytoolz\tests running build_ext building 'cytoolz.dicttoolz' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [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. ╰─> cytoolz

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

fselmo commented 2 years ago

Hey @GWNdrew, this is the relevant information from the output above:

Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

This is a common issue. Have you tried installing Microsoft C++ Build Tools?

GWNdrew commented 2 years ago

Okay thank you - honestly did not understand why python needed Visual C++ But hey whatever makes it work. Turns out I cannot get Build Tools to install - I've asked MS to investigate.

I guess I won't be using eth-keys for a while if ever...

fselmo commented 2 years ago

@GWNdrew I believe this is an issue related to needing a C language compiler. Microsoft Visual C++ Build Tools (only the build tools) will install this dependency on Windows and that's why the error recommends that. For OSX, this is usually facilitated by installing xcode command line tools I believe. For Windows it gets a bit trickier. There are examples around where people had success with different methods as most of the time these errors are related to the cytoolz library or the bitarray library.

I hope one of the answers floating out there works for you. Best of luck.

GWNdrew commented 2 years ago

Thanks I'll wait and see if MS actually helps me with the installation.

GWNdrew commented 2 years ago

Good news, MS came back and said "the Microsoft Visual C++ Minimum Runtime cannot be installed successfully because an old version installed on your machine is damaged and cannot be removed. Please download the Program Install and Uninstall troubleshooting tool and kindly follow the steps below: https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed " I did try the troubleshooter but it wouldn't uninstall the pesky bad installation. I was able to remove it in "W10-add or remove programs" and then MSVC++ installed!!! I just tried pip3 install eth-keys and it successfully installed!!! Thank you for your help

fselmo commented 2 years ago

Amazing. Thanks for the update. I think this may help out in troubleshooting these kinds of issues in the future. Glad you got unstuck!