This repository has been archived by the owner on May 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 173
Installing pynacl on Windows
Brian Hoffman edited this page Sep 22, 2015
·
13 revisions
This is a work in progress wiki for installing pynacl library on Windows. These instructions have been tested on:
- Windows 8.1 Professional
- Install Python 2.7 64-bit
- Get Visual C++ for Python 9.0 (http://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi)
- Create directory c:\work
- Download libsodium-msvc-1.0.3.zip (https://download.libsodium.org/libsodium/releases/libsodium-1.0.3-msvc.zip
- Extract into c:\work
- Make a copy and rename the following files:
- c:\work\libsodium-1.0.3-msvc\x64\Release\v110\dynamic\libsodium.dll -> sodium.dll
- c:\work\libsodium-1.0.3-msvc\x64\Release\v110\dynamic\libsodium.lib -> sodium.lib
- Download these two files and put them in lib sodium-msvc-1.0.3\include
- Download https://github.com/pyca/pynacl/archive/v0.3.0.zip and extract to c:\work\pynacl
- Open Visual C++ 2008 64-Bit Command Prompt
- cd c:\work\pynacl
- set PATH=%PATH%;c:\python27;c:\python27\Scripts
- set INCLUDE=c:\libsodium-1.0.3-msvc\include
- set LIB=c:\work\libsodium-1.0.3-msvc\x64\Release\v140\dynamic
- set SODIUM_INSTALL=system
- python setup.py install [This will probably fail]
- Copy c:\work\libsodium-1.0.3-msvc\x64\Release\v140\libsodium.dll C:\Python27\Lib\site-packages\PyNaCl-0.3.0-py2.7-win-amd64.egg\nacl\_lib
- Go back to the Command Prompt and run python setup.py install
- Test install went properly by opening python command prompt and running the following command. It should not produce any output if install was successful.
- import nacl.signing
Options:
- Install all Windows Updates