I've been trying to install the Python package scrypt
on my Windows 64 bit laptop, because another package that I want to use requires it. This same package also requires Python 3.6, so on my computer I have both Python 2.7 as well as 3.6, and use pip
and pip3
to distinguish between the two. When doing pip install scrypt
everything installs fine, but when using pip3 install scrypt
I get the following error:
scrypt-1.2.0/lib/crypto\crypto_scrypt.h(33): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
I have tried solving this by cloning the repository like so:
$ hg clone http://bitbucket.org/mhallin/py-scrypt
$ cd py-scrypt
$ PATHTOPYTHON3 setup.py build
which then gives the following error
scrypt-1.2.0/libcperciva/crypto/crypto_aes.c(6): fatal error C1083: Cannot open include file: 'openssl/aes.h': No such file or directory
I then solved this error by changing the following code in setup.py
elif sys.platform.startswith('win32'):
define_macros = [('inline', '__inline')]
libraries = ['libeay32', 'advapi32']
extra_sources = ['scrypt-windows-stubs/gettimeofday.c']
if struct.calcsize('P') == 8:
library_dirs = ['c:\OpenSSL-Win64\lib']
includes = ['c:\OpenSSL-Win64\include', 'scrypt-windows stubs/include']
else:
library_dirs = ['c:\OpenSSL-Win32\lib']
includes = ['c:\OpenSSL-Win32\include', 'scrypt-windows-stubs/include']
to simply have the the libraries be the 64 bit ones
library_dirs = ['c:\OpenSSL-Win64\lib']
includes = ['c:\OpenSSL-Win64\include', 'scrypt-windows
but this once again gives an error:
LINK : fatal error LNK1181: cannot open input file 'libeay32.lib'
After this I gave up and came here to ask what to do. How can I get scrypt
working with Python 3.6 on Windows?