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
crazylinus
V2EX  ›  Python

求助, Python3.5, windows10 下安装 lxml 失败

  •  
  •   crazylinus · 2016-04-29 12:09:06 +08:00 · 11411 次点击
    这是一个创建于 2925 天前的主题,其中的信息可能已经有所发展或是发生改变。
    使用了 pip (离线安装)和 easy_install (在线安装)两种办法,都报错。

    1.使用 pip 安装(已将 lxml 的 whl 文件下载到本地)报错如下:
    C:\Users\Home\AppData\Local\Programs\Python\Python35-32\Scripts>pip install lxml-3.6.0-cp35-cp35m-win_amd64.whl
    lxml-3.6.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.

    2.使用 easy_install 安装,报错如下:
    Using build configuration of libxslt
    cl: 命令行 warning D9025 :正在重写“/W3 ”(用“/w ”)
    lxml.etree.c
    src\lxml\includes\etree_defs.h(14): fatal error C1083: 无法打开包括文件: “ libxml/xmlversion.h ”: No such file
    or directory
    Compile failed: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with e
    xit status 2

    请老司机指教。
    第 1 条附言  ·  2016-04-29 13:08:34 +08:00
    把 Python 换成 64 位之后,再用 pip 离线安装就 Joy 了,怪自己太不谨慎了,感谢大家的帮助。
    8 条回复    2016-04-29 13:07:23 +08:00
    ThunderEX
        1
    ThunderEX  
       2016-04-29 12:29:15 +08:00   ❤️ 1
    由:
    C:\Users\Home\AppData\Local\Programs\Python\Python35-32\Scripts>pip install lxml-3.6.0-cp35-cp35m-win_amd64.whl
    lxml-3.6.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.

    貌似你的 py 是 32bit 的而 lxml 是 64bit 的?
    crazylinus
        2
    crazylinus  
    OP
       2016-04-29 12:36:09 +08:00 via Android
    python 还分 32 位和 64 位吗?我在官网上下载的时候好像没有叫我选 32 位或者 64 位。
    crazylinus
        3
    crazylinus  
    OP
       2016-04-29 12:36:29 +08:00 via Android
    @ThunderEX python 还分 32 位和 64 位吗?我在官网上下载的时候好像没有叫我选 32 位或者 64 位。
    just1
        4
    just1  
       2016-04-29 12:38:03 +08:00 via Android   ❤️ 1
    crazylinus
        5
    crazylinus  
    OP
       2016-04-29 12:41:53 +08:00
    @just1 好像从 python3.5 开始已经不分了吧,看看这个下载链接: https://www.python.org/downloads/windows/, 3.5 的安装包已经没有区分 x86 和 x64 了。
    xujif
        6
    xujif  
       2016-04-29 12:43:56 +08:00 via iPhone   ❤️ 1
    直接下编译好的
    just1
        7
    just1  
       2016-04-29 12:44:22 +08:00 via Android
    crazylinus
        8
    crazylinus  
    OP
       2016-04-29 13:07:23 +08:00 via Android
    @just1 找到了,谢了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   834 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 19:32 · PVG 03:32 · LAX 12:32 · JFK 15:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.