4

It all started with "Unable to find vcvarsall.bat" But I fixed it pretty quickly. After that I cannot fix some "error 2".

Already tried instructions here and here:

  • Installed Visual C++ compiler Python 2.7
  • Installed Microsoft Visual Studio 2008 Express Edition SP1
  • Installed Windows SDK for Windows 7 and .NET Framework 3.5 SP1
  • manipulated vcvarsall.bat and vsvars64

But still cannot install pyethash, PyYAML, scrypt. Details for pyethash are below.

Tried to install Crypto, which uses C++ libraries as well - and it works. Does it still looks like I have problems with compilers or should I look somewhere else?

Using windows 8.1 x64, python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)]

Installing with pip

PS C:\pyethereum\ethash-master> pip install pyethash
Collecting pyethash
  Using cached pyethash-0.1.27.tar.gz
Building wheels for collected packages: pyethash
  Running setup.py bdist_wheel for pyethash ... error
  Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\b19a~1\\ap
pdata\\local\\temp\\pip-build-y2vsbx\\pyethash\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().
replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d c:\users\b19a~1\appdata\local\temp\tmpwmonvkpip-wheel- --pytho
n-tag cp27:
  running bdist_wheel
  running build
  running build_ext
  building 'pyethash' extension
  error: [Error 2]

  ----------------------------------------
  Failed building wheel for pyethash
  Running setup.py clean for pyethash
Failed to build pyethash
Installing collected packages: pyethash
  Running setup.py install for pyethash ... error
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\b19a~1\\
appdata\\local\\temp\\pip-build-y2vsbx\\pyethash\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\b19a~1\appdata\local\temp\pip-pvhu8d-record\insta
ll-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'pyethash' extension
    error: [Error 2]

    ----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\b19a~1\\appdata\\local\\temp\\pi
p-build-y2vsbx\\pyethash\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'),
 __file__, 'exec'))" install --record c:\users\b19a~1\appdata\local\temp\pip-pvhu8d-record\install-record.txt --single-v
ersion-externally-managed --compile" failed with error code 1 in c:\users\b19a~1\appdata\local\temp\pip-build-y2vsbx\pyethash\

Installing manually

PS C:\pyethereum\ethash-master> python setup.py install
running install
running build
running build_ext
building 'pyethash' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tcsrc/python/core.c /Fobuild\temp.win-amd64-2.7\Release\src/python/core.obj -Isrc/ -std=gnu99 -Wallcl : Command line warning D9002 : ignoring unknown option '-std=gnu99'core.c
c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(81) : warning C4820: 'PreAttribute' : '4' bytes padding added after data member 'Access'
c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(96) : warning C4820: 

....
....
c:\python27\include\import.h(61) : warning C4820: '_frozen' : '4' bytes padding added after data member 'size'
c:\python27\include\code.h(26) : warning C4820: '<unnamed-tag>' : '4' bytes padding added after data member 'co_firstlineno'src/python/core.c(2) : fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\BIN\\amd64\\cl.exe' failed with exit status 2

1 Answer 1

1

alloca is only seen in Linux it's a critical bug see https://github.com/ethereum/ethash/pull/107

Sign up to request clarification or add additional context in comments.

1 Comment

Welcome to Stack Overflow. While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.