Installing python-ldap in a virtualenv on Windows

前端 未结 2 1504
无人及你
无人及你 2020-12-16 07:05

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 d

相关标签:
2条回答
  • 2020-12-16 07:38

    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

    0 讨论(0)
  • 2020-12-16 07:57

    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
      
    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)]
      
    3. Download the matching pre-built *.whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap

      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
      
    0 讨论(0)
提交回复
热议问题