V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
f2ex
V2EX  ›  Python

pip install django-auth-ldap 报错

  •  
  •   f2ex · 2016-03-14 17:26:54 +08:00 · 4492 次点击
    这是一个创建于 2969 天前的主题,其中的信息可能已经有所发展或是发生改变。

    windows 10 和 python 2.7.9 环境

    pip 安装 django-auth-ldap 报错:
    error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27

    根据提示去官网下载了 vcforpython2.7 的安装包,安装之后,依然报错。

    error: command 'C:\Users\gu\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\
    Bin\amd64\cl.exe' failed with exit status 2

    有大神遇到过这个问题吗?请问要怎么解决,谢谢了。

    6 条回复    2016-03-14 18:48:45 +08:00
    f2ex
        1
    f2ex  
    OP
       2016-03-14 17:39:31 +08:00
    vcforpython27 这个包重装过好几次了,是安装之后还要进行什么配置吗?
    Allianzcortex
        2
    Allianzcortex  
       2016-03-14 17:41:55 +08:00
    直到我彻底转投 Linux 之前是无解的。部分 Python 包需要 visual C++ 的支持,但用了 virtualenv 之后就全乱了。大概一年半前。

    我的无解意思是你不知道它什么时候就出问题了。爆栈站上是有解决方法,但你就看着下面一堆人说 Thanks ,自己还是根本没有办法用。

    或者用虚拟机先装 Linux 用(其实完全格式化 Linux 装个 windows 虚拟机也不是什么太大问题)

    或者, good luck:-) http://stackoverflow.com/questions/27670365/python-pip-install-error-unable-to-find-vcvarsall-bat-tried-all-solutions
    f2ex
        3
    f2ex  
    OP
       2016-03-14 17:44:15 +08:00
    @Allianzcortex 我系统从 win8.1 自动升级到 win10 的时候,还是正常的, 后来重新安装了次 win10 就开始了,哎。。
    谢谢给的链接,我去试试看能不能解决。三克油
    loadingimg
        4
    loadingimg  
       2016-03-14 18:29:03 +08:00
    我的也是这个错误
    f2ex
        5
    f2ex  
    OP
       2016-03-14 18:30:10 +08:00
    @Allianzcortex
    问题解决了。我先把 VcForPython27 的包安装上,然后把 python27 卸载干净,为了确保,重启下电脑,
    然后在安装 python2.7.x ,最后再执行 pip install django-auth-ldap 安装成功。
    Allianzcortex
        6
    Allianzcortex  
       2016-03-14 18:48:45 +08:00
    @f2ex congratulations--:)
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3268 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 10:24 · PVG 18:24 · LAX 03:24 · JFK 06:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.