Python analysis tut with PANDAS video 4

by: devtycoon, 9 years ago

Last edited: 9 years ago

Help please :)

I have been looking around online and can not get information on the error I am receiving.



Error Message in Python 3.5.1 Shell

Traceback (most recent call last):
  File "C:UsersBDesktopNew folderbuildHousingEstateDataset.py", line 12, in <module>
    fiddy_states = pd.read_html('https://simple.wikipedia.org/wiki/List_of_U.S._states')
  File "C:UsersBAppDataLocalProgramsPythonPython35libsite-packagespandasiohtml.py", line 866, in read_html
    parse_dates, tupleize_cols, thousands, attrs, encoding)
  File "C:UsersBAppDataLocalProgramsPythonPython35libsite-packagespandasiohtml.py", line 718, in _parse
    parser = _parser_dispatch(flav)
  File "C:UsersBAppDataLocalProgramsPythonPython35libsite-packagespandasiohtml.py", line 677, in _parser_dispatch
    raise ImportError("lxml not found, please install it")
ImportError: lxml not found, please install it



code:

import pandas as pd

fiddy_states = pd.read_html('https://simple.wikipedia.org/wiki/List_of_U.S._states')

print(fiddy_states)

print('Complete')


pip list:

cycler (0.9.0)
Cython (0.23.4)
html5lib (0.9999999)
matplotlib (1.5.0)
numpy (1.10.1)
pandas (0.17.1)
pip (7.1.2)
pyparsing (2.0.6)
python-dateutil (2.4.2)
pytz (2015.7)
Quandl (2.8.9)
requests (2.8.1)
setuptools (18.2)
six (1.10.0)



You must be logged in to post. Please login or register an account.



I tried pip install lxml and that also errored



error: command 'C:Program Files (x86)Microsoft Visual Studio 14.0VCBINamd64cl.exe' failed with exit status 2
    *********************************************************************************
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    *********************************************************************************

    ----------------------------------------
Command "c:usersbappdatalocalprogramspythonpython35python.exe -c "import setuptools, tokenize;__file__='C:UsersBAppDataLocalTemppip-build-_55beug1lxmlsetup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record C:UsersBAppDataLocalTemppip-wjqe_ga7-recordinstall-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:UsersBAppDataLocalTemppip-build-_55beug1lxml


-devtycoon 9 years ago

You must be logged in to post. Please login or register an account.


pip install libxml2 shows the following error:

  Could not find a version that satisfies the requirement libxml2 (from versions: )
No matching distribution found for libxml2

-devtycoon 9 years ago

You must be logged in to post. Please login or register an account.