Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installation fails due to pyethash #13

Closed
pcaversaccio opened this issue Aug 1, 2022 · 8 comments
Closed

Windows installation fails due to pyethash #13

pcaversaccio opened this issue Aug 1, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@pcaversaccio
Copy link

pcaversaccio commented Aug 1, 2022

Installing titanoboa on Windows currently fails due to a build failure of pyethash:
image

  • Python version 3.9.2
  • Vyper version 0.3.4
  • OS: Windows 11 Pro (version 21H2)

The installation works smoothly using Ubuntu via WSL.

@charles-cooper
Copy link
Member

upstream issue - ethereum/py-evm#1941

@0xClandestine
Copy link

Windows subsystem for linux works.

@pcaversaccio
Copy link
Author

yes, that issue is not related to WSL. But that's the current workaround for anyone using Windows.

@pcaversaccio
Copy link
Author

@charles-cooper the full debugging details. I used a fork with the suggested change by @fubuloubu (https://github.com/pcaversaccio/titanoboa/commit/d8933ce85ffd45c5a3ad48057e968a0572e79d0b)

Collecting git+https://github.com/pcaversaccio/titanoboa@pysha3
  Cloning https://github.com/pcaversaccio/titanoboa (to revision pysha3) to c:\users\pasca\appdata\local\temp\pip-req-build-xdzlft4b
  Running command git clone --filter=blob:none --quiet https://github.com/pcaversaccio/titanoboa 'C:\Users\pasca\AppData\Local\Temp\pip-req-build-xdzlft4b'
  Running command git checkout -b pysha3 --track origin/pysha3
  branch 'pysha3' set up to track 'origin/pysha3'.
  Switched to a new branch 'pysha3'
  Resolved https://github.com/pcaversaccio/titanoboa to commit d8933ce85ffd45c5a3ad48057e968a0572e79d0b
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: eth-hash[pysha3] in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from titanoboa==0.1.5) (0.2.0)
Collecting py-evm
  Using cached py_evm-0.6.0a1-py3-none-any.whl (279 kB)
Requirement already satisfied: vyper>=0.3.6 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from titanoboa==0.1.5) (0.3.6)
Requirement already satisfied: eth-abi in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from titanoboa==0.1.5) (2.1.1)
Requirement already satisfied: eth-typing in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from titanoboa==0.1.5) (2.2.2)
Requirement already satisfied: semantic-version==2.8.5 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from vyper>=0.3.6->titanoboa==0.1.5) (2.8.5)
Requirement already satisfied: pycryptodome<4,>=3.5.1 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from vyper>=0.3.6->titanoboa==0.1.5) (3.11.0)
Requirement already satisfied: asttokens==2.0.5 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from vyper>=0.3.6->titanoboa==0.1.5) (2.0.5)
Requirement already satisfied: wheel in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from vyper>=0.3.6->titanoboa==0.1.5) (0.35.1)
Requirement already satisfied: six in c:\users\pasca\appdata\roaming\python\python39\site-packages (from asttokens==2.0.5->vyper>=0.3.6->titanoboa==0.1.5) (1.15.0)
Requirement already satisfied: parsimonious<0.9.0,>=0.8.0 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from eth-abi->titanoboa==0.1.5) (0.8.1)
Requirement already satisfied: eth-utils<2.0.0,>=1.2.0 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from eth-abi->titanoboa==0.1.5) (1.9.5)
Requirement already satisfied: pysha3<2.0.0,>=1.0.0 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from eth-hash[pysha3]->titanoboa==0.1.5) (1.0.2)
  Using cached py_evm-0.5.0a3-py3-none-any.whl (276 kB)
Requirement already satisfied: lru-dict>=1.1.6 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from py-evm->titanoboa==0.1.5) (1.1.7)
Requirement already satisfied: rlp<3,>=2 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from py-evm->titanoboa==0.1.5) (2.0.1)
Collecting py-ecc<6.0.0,>=1.4.7
  Using cached py_ecc-5.2.0-py3-none-any.whl (43 kB)
Collecting pyethash<1.0.0,>=0.1.27
  Using cached pyethash-0.1.27.tar.gz (38 kB)
  Preparing metadata (setup.py) ... done
Collecting eth-typing
  Using cached eth_typing-2.3.0-py3-none-any.whl (6.2 kB)
Collecting cached-property<2,>=1.5.1
  Using cached cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Collecting eth-keys<0.4.0,>=0.3.4
  Using cached eth_keys-0.3.4-py3-none-any.whl (21 kB)
Collecting eth-bloom<2.0.0,>=1.0.3
  Using cached eth_bloom-1.0.4-py3-none-any.whl (5.4 kB)
Requirement already satisfied: mypy-extensions<1.0.0,>=0.4.1 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from py-evm->titanoboa==0.1.5) (0.4.3)
Collecting trie==2.0.0-alpha.5
  Using cached trie-2.0.0a5-py3-none-any.whl (38 kB)
Requirement already satisfied: sortedcontainers<3,>=2.1.0 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from trie==2.0.0-alpha.5->py-evm->titanoboa==0.1.5) (2.4.0)
Requirement already satisfied: hexbytes<0.3.0,>=0.2.0 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from trie==2.0.0-alpha.5->py-evm->titanoboa==0.1.5) (0.2.2)
Requirement already satisfied: typing-extensions<4,>=3.7.4 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from trie==2.0.0-alpha.5->py-evm->titanoboa==0.1.5) (3.10.0.2)
Collecting eth-bloom<2.0.0,>=1.0.3
  Using cached eth_bloom-1.0.3-py3-none-any.whl (5.4 kB)
Requirement already satisfied: cytoolz<1.0.0,>=0.10.1 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from eth-utils<2.0.0,>=1.2.0->eth-abi->titanoboa==0.1.5) (0.11.2)
Requirement already satisfied: toolz>=0.8.0 in c:\users\pasca\appdata\local\programs\python\python39\lib\site-packages (from cytoolz<1.0.0,>=0.10.1->eth-utils<2.0.0,>=1.2.0->eth-abi->titanoboa==0.1.5) (0.11.2)
Building wheels for collected packages: titanoboa, pyethash
  Building wheel for titanoboa (pyproject.toml) ... done
  Created wheel for titanoboa: filename=titanoboa-0.1.5-py3-none-any.whl size=21175 sha256=434c538cb4c5f7fc5e2f3dda12d9f28bf449860361ac5d15dee0bebb5245448c
  Stored in directory: C:\Users\pasca\AppData\Local\Temp\pip-ephem-wheel-cache-6mj6xu9d\wheels\b4\31\d7\7d330223dac588b0161e36f316bfd5a296c455988e84448771
  Building wheel for pyethash (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'pyethash' extension
      creating build
      creating build\temp.win-amd64-3.9
      creating build\temp.win-amd64-3.9\Release
      creating build\temp.win-amd64-3.9\Release\src
      creating build\temp.win-amd64-3.9\Release\src\libethash
      creating build\temp.win-amd64-3.9\Release\src\python
      C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\pasca\AppData\Local\Programs\Python\Python39\include -IC:\Users\pasca\AppData\Local\Programs\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcsrc/libethash/internal.c /Fobuild\temp.win-amd64-3.9\Release\src/libethash/internal.obj -Isrc/ -std=gnu99 -Wall
      cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
      internal.c
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(212): warning C4668: '__cplusplus' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h(1833): warning C4710: 'int sprintf_s(char *const ,const size_t,const char *const ,...)': function not inlined
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h(1833): note: see declaration of 'sprintf_s'
      C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\pasca\AppData\Local\Programs\Python\Python39\include -IC:\Users\pasca\AppData\Local\Programs\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcsrc/libethash/io.c /Fobuild\temp.win-amd64-3.9\Release\src/libethash/io.obj -Isrc/ -std=gnu99 -Wall
      cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
      io.c
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(212): warning C4668: '__cplusplus' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h(1833): warning C4710: 'int sprintf_s(char *const ,const size_t,const char *const ,...)': function not inlined
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h(1833): note: see declaration of 'sprintf_s'
      C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\pasca\AppData\Local\Programs\Python\Python39\include -IC:\Users\pasca\AppData\Local\Programs\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcsrc/libethash/io_win32.c /Fobuild\temp.win-amd64-3.9\Release\src/libethash/io_win32.obj -Isrc/ -std=gnu99 -Wall
      cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
      io_win32.c
      c1: fatal error C1083: Cannot open source file: 'src/libethash/io_win32.c': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyethash
  Running setup.py clean for pyethash
Successfully built titanoboa
Failed to build pyethash
Installing collected packages: pyethash, cached-property, eth-typing, eth-bloom, py-ecc, eth-keys, trie, py-evm, titanoboa
  Running setup.py install for pyethash ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pyethash did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      running install
      C:\Users\pasca\AppData\Local\Programs\Python\Python39\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_ext
      building 'pyethash' extension
      creating build
      creating build\temp.win-amd64-3.9
      creating build\temp.win-amd64-3.9\Release
      creating build\temp.win-amd64-3.9\Release\src
      creating build\temp.win-amd64-3.9\Release\src\libethash
      creating build\temp.win-amd64-3.9\Release\src\python
      C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\pasca\AppData\Local\Programs\Python\Python39\include -IC:\Users\pasca\AppData\Local\Programs\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcsrc/libethash/internal.c /Fobuild\temp.win-amd64-3.9\Release\src/libethash/internal.obj -Isrc/ -std=gnu99 -Wall
      cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
      internal.c
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(212): warning C4668: '__cplusplus' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h(1833): warning C4710: 'int sprintf_s(char *const ,const size_t,const char *const ,...)': function not inlined
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h(1833): note: see declaration of 'sprintf_s'
      C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\pasca\AppData\Local\Programs\Python\Python39\include -IC:\Users\pasca\AppData\Local\Programs\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcsrc/libethash/io.c /Fobuild\temp.win-amd64-3.9\Release\src/libethash/io.obj -Isrc/ -std=gnu99 -Wall
      cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
      io.c
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(212): warning C4668: '__cplusplus' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h(1833): warning C4710: 'int sprintf_s(char *const ,const size_t,const char *const ,...)': function not inlined
      C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h(1833): note: see declaration of 'sprintf_s'
      C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\pasca\AppData\Local\Programs\Python\Python39\include -IC:\Users\pasca\AppData\Local\Programs\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcsrc/libethash/io_win32.c /Fobuild\temp.win-amd64-3.9\Release\src/libethash/io_win32.obj -Isrc/ -std=gnu99 -Wall
      cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
      io_win32.c
      c1: fatal error C1083: Cannot open source file: 'src/libethash/io_win32.c': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [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.
╰─> pyethash

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

@bout3fiddy bout3fiddy added the bug Something isn't working label Nov 19, 2022
@daog1
Copy link

daog1 commented Jan 12, 2023

You can use my git repository, and windows can be installed with the c++ compiler of vs. The effect is as follows: https://github.com/daog1/ethash
1673516669618

@daog1
Copy link

daog1 commented Jan 13, 2023

Manual installation, the effect is as follows:
There are also problems with the dependencies of other packages
image

@kclowes
Copy link

kclowes commented Jan 29, 2024

@charles-cooper FYI pyethash has been removed since py-evm v0.8.0-beta.1.

@pcaversaccio
Copy link
Author

Quickly tested it on my Windows machine and boa installation works smoothly. Closing this issue accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants