python을 사용하던 중 lxml이 이미 설치되어 있음에도 불구하고 계속해서 찾을 수 없으며 다시 설치하라는 오류가 발생할 때 해결 방법입니다.
문제
ImportError: lxml not found, please install it
C:\ProgramData\Anaconda3\envs\py32\lib\site-packages\pandas\io\html.py in read_html(io, match, flavor, header, index_col, skiprows, attrs, parse_dates, thousands, encoding, decimal, converters, na_values, keep_default_na, displayed_only)
1083 io = stringify_path(io)
1084
-> 1085 return _parse(
1086 flavor=flavor,
1087 io=io,
C:\ProgramData\Anaconda3\envs\py32\lib\site-packages\pandas\io\html.py in _parse(flavor, io, match, attrs, encoding, displayed_only, **kwargs)
887 retained = None
888 for flav in flavor:
--> 889 parser = _parser_dispatch(flav)
890 p = parser(io, compiled_match, attrs, encoding, displayed_only)
891
C:\ProgramData\Anaconda3\envs\py32\lib\site-packages\pandas\io\html.py in _parser_dispatch(flavor)
844 else:
845 if not _HAS_LXML:
--> 846 raise ImportError("lxml not found, please install it")
847 return _valid_parsers[flavor]
848
ImportError: lxml not found, please install it
해결
pandas 삭제, 재설치 후 업데이트와 lxml도 삭제, 재설치를 진행한다.
아래처럼 입력하여 진행하면 문제없이 해결됩니다.
pip uninstall pandas
pip install pandas
pip install -upgrade pandas
pip uninstall lxml
pip install lxml
판다스(Pandas) 명령어, 기능 모음 (0) | 2022.05.15 |
---|---|
아나콘다(Anaconda), Visual Studio Code(VSCode) 다운(+Kite, 파이참) (0) | 2022.02.21 |
Django 개발에 필요한 VSCode 디버그 설정하기 (0) | 2022.02.13 |
Visual Studio Code(VSCode) Powershell을 CMD로 바꾸기 (0) | 2022.02.08 |
파이썬 pip 업그레이드 중 오류 발생했을 때 해결 방법 (0) | 2022.02.07 |
2023.05.21 14:22
2022.05.12 20:06
2022.04.02 12:00
2016.08.02 21:13
2022.05.14 21:16
2022.10.23 22:55
2022.03.03 17:30
2022.10.25 10:18
2022.02.16 21:55
2015.01.20 20:42
IT/Python
Financial/국내주식
Financial/시장
일상
IT/Util and 꿀팁
일상/여행
Financial/국내주식
Financial/해외주식
Financial/부동산
IT/Python
댓글 영역