10

I'm working on a Django project that is using an ldap authentication module. This is working on our server but I am running into issues getting this running on my windows dev machine.

My environment is using virtualevn and when trying to install pip python-ldap I receive the following message:

error: Unable to find vcvarsall.bat

Does anyone have any idea what could be going wrong?

0

2 Answers 2

37

To expand on @Brandon's answer, to install using the pre-built wheel:

  1. Ensure you have pip 19.2+ installed:

    $ pip --version
    pip 19.2.3
    

    Upgrade it just in case:

    $ python -m pip install -upgrade pip
    
  2. Check your Python version and architecture (32/64 bit) https://stackoverflow.com/a/10966396/1026:

    $ python -c 'import sys; print(sys.version)'
    3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
    

    or look at "compatible tags" reported by pip:

    python -m pip debug --verbose
    
  3. Download the matching pre-built *.whl from https://github.com/cgohlke/python-ldap-build/releases

    For example given the above Python I picked "python_ldap‑3.2.0‑cp37‑cp37m‑win_amd64.whl"

  4. Install it with:

     pip install path\to\your.whl
    
Sign up to request clarification or add additional context in comments.

1 Comment

I couldn't get the latest build 38 to work but I did get build 37 (which he noted) to install successfully! python_ldap‑3.2.0‑cp37‑cp37m‑win_amd64.whl
16

Unfortunately, many Python modules have trouble installing on Windows. The error you're receiving is one that I was never able to get fixed, even given the vast amount of information available on the web. Give this link a try for a pre-compiled version: http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap

moved here: https://github.com/cgohlke/python-ldap-build/?tab=readme-ov-file

1 Comment

I installed python_ldap‑3.4.0‑cp311‑cp311‑win_amd64.whl on win10 x64 like a charm!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.