我正试图在谷歌Colaboratory上移植我的代码.即便如此,这也很奇怪
!pip3 install xml
Run Code Online (Sandbox Code Playgroud)
在我的代码中.它仍然需要我安装lxml.
有人有问题吗?
****Requirement already satisfied: lxml in /usr/local/lib/python3.6/dist-packages****
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-17-eda66c9ec97a> in <module>()
48 #df = financial_statement(2017,3)
...
/usr/local/lib/python3.6/dist-packages/pandas/io/html.py in _parser_dispatch(flavor)
695 else:
696 if not _HAS_LXML:
--> 697 raise ImportError("lxml not found, please install it")
698 return _valid_parsers[flavor]
699
**ImportError: lxml not found, please install it**
**code:**
!pip3 install lxml
import requests
import pandas as pd
import numpy as np
import keras
import lxml
import html5lib
from bs4 import BeautifulSoup …Run Code Online (Sandbox Code Playgroud)