Trouble Installing Correct Version of lxml (with updated context)

耗尽温柔 提交于 2019-12-13 02:59:05

问题


I've posted this question earlier but have more info. now that may be helpful in trying to resolve this issue. After checking what Python platform I have using:

import platform
platform.architecture()

It reads:

('64bit', 'WindowsPE')

I still haven't found a way to get the correct version of lxml, since I'm still getting the error when I import the module, which reads:

  File "L:\Code\Scripts\YelpScraper.py", line 1, in <module>
  from lxml import html
  File "L:\Code\Scripts\lxml\html\__init__.py", line 42, in <module>
  from lxml import etree
  ImportError: DLL load failed: %1 is not a valid Win32 application.

From the advice given here, I've gone to http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml and tried to download the correct version.

The only .whl file I was able to successfully install was using:

pip install lxml-4.0.0-cp27-cp27m-win32.whl

However, I still get the import etree error with this version. So I tried other versions of lxml, but still get the error "Is not a supported wheel on this platform" for the following files:

pip install lxml-3.8.0-cp27-cp27m-win_amd64.whl
pip install lxml-3.8.0-cp35-cp35m-win32.whl
pip install lxml-4.0.0-cp35-cp35m-win32.whl
pip install lxml-3.8.0-cp34-cp34m-win32.whl
pip install lxml-3.8.0-cp36-cp36m-win32.whl

So confused here why this is not working so any help appreciated in addition to the help that's already given. I need this to work to begin a web scraping script so thanks in advance.

来源:https://stackoverflow.com/questions/46454548/trouble-installing-correct-version-of-lxml-with-updated-context

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!