Windows安装lxml

  1. 使用pip install lxml 出现的错误
    error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
  2. 安装VCforPython后依然安装不成功
  3. 打开http://peak.telecommunity.com/dist/ez_setup.py将代码复制到ez_setup.py
  4. 打开cmd执行python ez_setup.py
  5. 右键“我的电脑”,选择“属性”,选择“高级系统设置”,在环境变量中添加本机python安装目录下的scripts文件路径(C:\Python27\Scripts)
  6. 打开https://pypi.python.org/pypi/lxml/2.3/,下载符合本机要求和本机python版本要求的 .egg 文件
  7. 打开cmd, 输入easy_install …….egg(下载.egg文件在本机的路径),显示如下则安装成功

C:>easy_install C:\Users\dell\Desktop\lxml-2.3-py2.7-win-amd64.eggProcessing lxml-2.3-py2.7-win-amd64.eggcreating c:\python27\lib\site-packages\lxml-2.3-py2.7-win-amd64.eggExtracting lxml-2.3-py2.7-win-amd64.egg to c:\python27\lib\site-packagesAdding lxml 2.3 to easy-install.pth fileInstalled c:\python27\lib\site-packages\lxml-2.3-py2.7-win-amd64.eggProcessing dependencies for lxml==2.3Finished processing dependencies for lxml==2.3

点击并拖拽以移动

你可能感兴趣的:(Windows安装lxml)