python - Pandas Install Issue -


i've run pip install pandas , seemed ton of warnings end seemed have installed successfully. i've run pip install requests.

when call function line:

getteamroster("http://modules.ussquash.com/ssm/pages/leagues/team_information.asp?id=11325") 

i error (seems not read_html call , wants me install lxml?):

traceback (most recent call last):   file "squashscraper.py", line 51, in <module>     main()   file "squashscraper.py", line 48, in main     getteamroster("http://modules.ussquash.com/ssm/pages/leagues/team_information.asp?id=11325")   file "squashscraper.py", line 39, in getteamroster     tables = pd.read_html(requests.get(teamurl).content)   file "/library/frameworks/python.framework/versions/3.3/lib/python3.3/site-packages/pandas/io/html.py", line 865, in read_html     parse_dates, tupleize_cols, thousands, attrs, encoding)   file "/library/frameworks/python.framework/versions/3.3/lib/python3.3/site-packages/pandas/io/html.py", line 718, in _parse     parser = _parser_dispatch(flav)   file "/library/frameworks/python.framework/versions/3.3/lib/python3.3/site-packages/pandas/io/html.py", line 677, in _parser_dispatch     raise importerror("lxml not found, please install it") importerror: lxml not found, please install 

any ideas what's going on here?

happy provide more info if needed.

thanks, bclayman

edit add:

pip install got me:

error: command '/usr/bin/clang' failed exit status 1 command /usr/local/bin/python3 -c "import setuptools, tokenize;__file__='/private/var/folders/m_/v2nkdbd935l6zwky8jm1g68r0000gn/t/pip_bu‌​ild_ben/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/m_/v2nkdbd935l6zwky8jm1g68r0000gn/t/pip-fn3n3u-record/install-recor‌​d.txt --single-version-externally-managed --compile failed error code 1 in /private/var/folders/m_/v2nkdbd935l6zwky8jm1g68r0000gn/t/pip_build_ben/lxml  

notice following error message:

importerror: lxml not found, please install 

that means need install python-lxml package on linux.

on ubuntu

sudo apt-get -y install python-lxml 

on fedora

sudo yum -y install python-lxml 

on mac

brew install libxml2 brew install libxslt static_deps=true sudo pip install lxml 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -