- 使用pip install lxml 出現(xiàn)的錯誤
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27 - 安裝VCforPython后依然安裝不成功
- 打開http://peak.telecommunity.com/dist/ez_setup.py將代碼復(fù)制到ez_setup.py
- 打開cmd執(zhí)行python ez_setup.py
- 右鍵“我的電腦”,選擇“屬性”戒悠,選擇“高級系統(tǒng)設(shè)置”,在環(huán)境變量中添加本機(jī)python安裝目錄下的scripts文件路徑(C:\Python27\Scripts)
- 打開https://pypi.python.org/pypi/lxml/2.3/,下載符合本機(jī)要求和本機(jī)python版本要求的 .egg 文件
- 打開cmd, 輸入easy_install …….egg(下載.egg文件在本機(jī)的路徑),顯示如下則安裝成功
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
點(diǎn)擊并拖拽以移動