tiran / pysha3

Backport of hashlib.sha3 for 2.7 to 3.5

Home Page:https://docs.python.org/3/library/hashlib.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation issue installing pysha3 on windows

mikera opened this issue · comments

Hi,

I'm trying to install pysha3 on windows using the following:

pip install sha3

I get the following error:

C:\Users\Mike\git\ProtoKeeper>pip install sha3 Collecting sha3 Using cached sha3-0.2.1.tar.gz Installing collected packages: sha3 Running setup.py install for sha3 ... error Complete output from command c:\prog\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Mike\\AppData\\Local\\Temp\\pip-build-_gzd3oe7\\sha3\\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\Mike\AppData\Local\Temp\pip-3vd4i04y-record\install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win32-3.6 creating build\lib.win32-3.6\sha3 copying sha3\__init__.py -> build\lib.win32-3.6\sha3 running build_ext building '_sha3' extension creating build\temp.win32-3.6 creating build\temp.win32-3.6\Release creating build\temp.win32-3.6\Release\src creating build\temp.win32-3.6\Release\src\64 C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/64 -Ic:\prog\python\python36-32\include -Ic:\prog\python\python36-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.13.26128\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /Tcsha3.c /Fobuild\temp.win32-3.6\Release\sha3.obj sha3.c sha3.c(33): error C2016: C requires that a struct or union has at least one member error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.13.26128\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2

Am I doing something wrong or is this a bug?

The sha3 module on PyPI is not my module. but https://github.com/bjornedstrom/python-sha3. Because sha3 name was already taken by the other module, the backport of the sha3 standard library module module is https://pypi.python.org/pypi/pysha3.

Since you are running Python 3.6, sha3 is already build in: from hashlib import sha3_256.

Ah OK that makes more sense now - thanks for your help and advice!