使用pip install lxml 出现的错误error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
安装VCforPython后依然安装不成功
打开http://peak.telecommunity.com/dist/ez_setup.py将代码复制到ez_setup.py
打开cmd执行python ez_setup.py 右键“我的电脑”,选择“属性”,选择“高级系统设置”,在环境变量中添加本机python安装目录下的scripts文件路径(C:\Python27\Scripts)
打开https://pypi.python.org/pypi/lxml/2.3/,下载符合本机要求和本机python版本要求的 .egg 文件 打开cmd, 输入easy_install …….egg(下载.egg文件在本机的路径),显示如下则安装成功
C:>easy_install C:\Users\dell\Desktop\lxml-2.3-py2.7-win-amd64.egg
Processing lxml-2.3-py2.7-win-amd64.egg creating
c:\python27\lib\site-packages\lxml-2.3-py2.7-win-amd64.egg Extracting
lxml-2.3-py2.7-win-amd64.egg to c:\python27\lib\site-packages Adding
lxml 2.3 to easy-install.pth file Installed
c:\python27\lib\site-packages\lxml-2.3-py2.7-win-amd64.egg Processing
dependencies for lxml==2.3 Finished processing dependencies for
lxml==2.3