Activate the virtualenv, and then install BeautifulSoup4:
$ pip install BeautifulSoup4
When you installed bs4
with easy_install
, you installed it system-wide. So your system python can import it, but not your virtualenv python.
If you do not need bs4
to be installed in your system python path, uninstall it and keep it in your virtualenv.
For more information about virtualenvs, read this
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…