16

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.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
goks
  • 1,196
  • 3
  • 18
  • 37
  • 2
    Identified the issue and found the solution here http://www.chriscalender.com/resolving-saslsasl-h-not-found-during-cmake-when-building-mysql-on-windows/ – goks Oct 22 '14 at 15:28

3 Answers3

39

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
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
loicmathieu
  • 5,181
  • 26
  • 31
  • 1
    This really solved the issue of installing pyhs2 on Windows 7 , 64-bit, thanks @loicmathieu. It should be voted as the correct answer. – ML_Passion Jan 09 '17 at 21:56
  • The download link is broken. You can find here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#sasl – ursuleacv Feb 15 '17 at 23:20
  • 1
    there is no file available for win64. Is there any alterantive? – Chandra Mar 13 '17 at 20:58
  • Hi, the file in the answer is for win64 (it's called amd64 ... this just means the 64bit CPU architecture) – loicmathieu Mar 15 '17 at 14:08
  • PS C:\tools> pip install .\sasl-0.1.3-cp27-none-win_amd64.whl ERROR: sasl-0.1.3-cp27-none-win_amd64.whl is not a supported wheel on this platform. WARNING: You are using pip version 20.0.2; however, version 20.1.1 is available. You should consider upgrading via the 'c:\users\eugene_wang\appdata\local\programs\python\python38\python.exe -m pip install --upgrade pip' command. – yuzhen Jul 07 '20 at 08:56
  • 1
    ERROR: sasl-0.2.1-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform. – yuzhen Jul 07 '20 at 08:58
  • 2
    PS C:\tools> pip install .\sasl-0.2.1-cp37-cp37m-win_amd64.whl Processing c:\tools\sasl-0.2.1-cp37-cp37m-win_amd64.whl ,! YOU HAVE TO install this wheel EXACTLY the same version as your Python Version, or else it gives error! – yuzhen Jul 07 '20 at 09:23
  • Unfortunately there is not a sasl version 0.2.1 for p310 - which is a requirement of some packages such as impala shell. This solution does work to get sasl installed but we need more wheels for older sasl versions – Sanchez333 May 24 '22 at 06:59
7

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
aaronsteers
  • 2,277
  • 2
  • 21
  • 38
  • Thanks to @loicmathieu for the original fix! This answer expands upon the original, with additional automation details and some info on the various version/platform options. – aaronsteers Sep 26 '19 at 20:04
0

My 5 cents for those who use pipenv and want the package be installed on both Linux and Windows, the following worked for me (sasl 0.2.1):

[packages]
...
sasl = {version = "==0.2.1", markers = "platform_system == 'Linux'"}
sasl_win = {version = "==0.2.1", markers = "platform_system == 'Windows'", file = "https://download.lfd.uci.edu/pythonlibs/g5apjq5m/sasl-0.2.1-cp37-cp37m-win_amd64.whl"}
...

See the comment on the corresponding Github issue.

GoodDok
  • 1,770
  • 13
  • 28