Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install sasl-0.1.3 python package on windows machine

I am trying to install sasl-0.1.3 python package on windows 7 (64 bit machine). It is fialing wiht C1083 fatal error.

Looks like saslwrapper.cpp is unable to include sasl/sasl.h library in c++ module.

enter image description here

Please help me in resolving the issue. Let me know if you need more details.

I installed python 2.7 on my machine.

like image 632
goks Avatar asked Oct 22 '14 10:10

goks


2 Answers

The easier way I find to install sasl on windows 7 is to use the pre-compiled version from here : http://www.lfd.uci.edu/~gohlke/pythonlibs/

There is a direct link to the sasl librairies here : http://www.lfd.uci.edu/~gohlke/pythonlibs/#sasl just pick the one you need.

Then you install it using pip :

pip install sasl-0.1.3-cp27-none-win_amd64.whl
like image 67
loicmathieu Avatar answered Oct 20 '22 00:10

loicmathieu


Automated install approach

In the interest of getting to high levels of automation, and to hopefully save other users time, the below works also for automated installations. (Substitute a different mirror URL if needed.)

pip install https://download.lfd.uci.edu/pythonlibs/g5apjq5m/sasl-0.2.1-cp37-cp37m-win_amd64.whl

Also, be advised the "cp37" text in the file name is important - you'll want to match this text to the version of python you are using. I am on Python 3.7, which is cp37 (aka CPython 3.7). (More info here.)

As of the time of this post, the available version/platform combinations are:

sasl‑0.1.3‑cp27‑none‑win32.whl
sasl‑0.1.3‑cp27‑none‑win_amd64.whl
sasl‑0.2.1‑cp27‑cp27m‑win32.whl
sasl‑0.2.1‑cp27‑cp27m‑win_amd64.whl
sasl‑0.2.1‑cp35‑cp35m‑win32.whl
sasl‑0.2.1‑cp35‑cp35m‑win_amd64.whl
sasl‑0.2.1‑cp36‑cp36m‑win32.whl
sasl‑0.2.1‑cp36‑cp36m‑win_amd64.whl
sasl‑0.2.1‑cp37‑cp37m‑win32.whl
sasl‑0.2.1‑cp37‑cp37m‑win_amd64.

Automated install of the VS C++ Tools and and sasl at the same time.

The below is a fully-automated install of everything you need.

  1. From an elevated command prompt, install the Choco package manager (if you have not already).
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
  1. Install C++ Build Tools
choco install microsoft-visual-cpp-build-tools
  1. Install Sasl (customize the URL per the above guidance)
pip install https://download.lfd.uci.edu/pythonlibs/g5apjq5m/sasl-0.2.1-cp37-cp37m-win_amd64.whl
like image 7
aaronsteers Avatar answered Oct 20 '22 00:10

aaronsteers