Open mohsin5432 opened 2 years ago
Having a similar error with pip install django-web3-auth : Failed to build pyethash
ERROR: Command errored out with exit status 1: 'c:\users\caleb\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\caleb\AppData\Local\Temp\pip-install-xdnpmh6r\pyethash_ceeb21f13ae54ac990ce6f3de2e9e10f\setup.py'"'"'; file='"'"'C:\Users\caleb\AppData\Local\Temp\pip-install-xdnpmh6r\pyethash_ceeb21f13ae54ac990ce6f3de2e9e10f\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\caleb\AppData\Local\Temp\pip-record-a5awsamr\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\caleb\AppData\Roaming\Python\Python39\Include\pyethash' Check the logs for full command output.
I Have the same Issue! Pls fix it!
Seems the example code is not fully uploaded here too?
Also metamask is not injecting web3 anymore: https://medium.com/metamask/no-longer-injecting-web3-js-4a899ad6e59e
Try using the python-dev packages for whatever version of python you're using, that got it to work for me.
I have same problem with library pyethash. Do you have solution?
Install the python-dev packages, that fixed all installation issues for me.
If you are using it on window, it might not work. Try installing the same on Ubuntu or WSL, and as mentioned if the problem still persists follow @dataforestLTD answer
i have the same issue on window i tried with python 3.8, 3.9, 3.10 but it does not work.anyone can solve this issue.
i have the same issue on window i tried with python 3.8, 3.9, 3.10 but it does not work.anyone can solve this issue.
To my knowledge, this will not work on Windows due to one of the requirements not working on windows.
Requirement already satisfied: asgiref<4,>=3.3.2 in c:\users\mohsin\appdata\local\programs\python\python39\lib\site-packages (from Django>=2.0->django-web3-auth==0.1.5) (3.4.1) Requirement already satisfied: sqlparse>=0.2.2 in c:\users\mohsin\appdata\local\programs\python\python39\lib\site-packages (from Django>=2.0->django-web3-auth==0.1.5) (0.4.1) Requirement already satisfied: eth-hash<0.4.0,>=0.3.1 in c:\users\mohsin\appdata\local\programs\python\python39\lib\site-packages (from eth_utils>=1.0.3->django-web3-auth==0.1.5) (0.3.2) Requirement already satisfied: eth-typing<3.0.0,>=2.2.1 in c:\users\mohsin\appdata\local\programs\python\python39\lib\site-packages (from eth_utils>=1.0.3->django-web3-auth==0.1.5) (2.2.2) Requirement already satisfied: cytoolz<1.0.0,>=0.10.1 in c:\users\mohsin\appdata\local\programs\python\python39\lib\site-packages (from eth_utils>=1.0.3->django-web3-auth==0.1.5) (0.11.0) Requirement already satisfied: toolz>=0.8.0 in c:\users\mohsin\appdata\local\programs\python\python39\lib\site-packages (from cytoolz<1.0.0,>=0.10.1->eth_utils>=1.0.3->django-web3-auth==0.1.5) (0.11.1) Requirement already satisfied: mypy-extensions>=0.4.1 in c:\users\mohsin\appdata\local\programs\python\python39\lib\site-packages (from py_ecc->ethereum==2.3.2->django-web3-auth==0.1.5) (0.4.3) Requirement already satisfied: cached-property<2,>=1.5.1 in c:\users\mohsin\appdata\local\programs\python\python39\lib\site-packages (from py_ecc->ethereum==2.3.2->django-web3-auth==0.1.5) (1.5.2) Using legacy 'setup.py install' for django-web3-auth, since package 'wheel' is not installed. Using legacy 'setup.py install' for ethereum, since package 'wheel' is not installed. Using legacy 'setup.py install' for pyethash, since package 'wheel' is not installed. Using legacy 'setup.py install' for future, since package 'wheel' is not installed. Using legacy 'setup.py install' for pbkdf2, since package 'wheel' is not installed. Installing collected packages: pyethash, py-ecc, pbkdf2, future, coincurve, ethereum, django-web3-auth Running setup.py install for pyethash ... error ERROR: Command errored out with exit status 1: command: 'c:\users\mohsin\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Mohsin\AppData\Local\Temp\pip-install-lausirkt\pyethash_6005ac2402734f45b9e3f0187f54226f\setup.py'"'"'; file='"'"'C:\Users\Mohsin\AppData\Local\Temp\pip-install-lausirkt\pyethash_6005ac2402734f45b9e3f0187f54226f\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Mohsin\AppData\Local\Temp\pip-record-ksjjftmi\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\mohsin\appdata\local\programs\python\python39\Include\pyethash' cwd: C:\Users\Mohsin\AppData\Local\Temp\pip-install-lausirkt\pyethash_6005ac2402734f45b9e3f0187f54226f\ Complete output (27 lines): running install 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\mohsin\appdata\local\programs\python\python39\include -Ic:\users\mohsin\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\mohsin\appdata\local\programs\python\python39\include -Ic:\users\mohsin\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\mohsin\appdata\local\programs\python\python39\include -Ic:\users\mohsin\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
ERROR: Command errored out with exit status 1: 'c:\users\mohsin\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Mohsin\AppData\Local\Temp\pip-install-lausirkt\pyethash_6005ac2402734f45b9e3f0187f54226f\setup.py'"'"'; file='"'"'C:\Users\Mohsin\AppData\Local\Temp\pip-install-lausirkt\pyethash_6005ac2402734f45b9e3f0187f54226f\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Mohsin\AppData\Local\Temp\pip-record-ksjjftmi\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\mohsin\appdata\local\programs\python\python39\Include\pyethash' Check the logs for full command output.