python3 上运行 user_xpath_demo.py
from lxml import html
ModuleNotFoundError: No module named 'lxml'
pip 安装 lxml
sudo pip install lxml
Password:
The directory '/Users/wangxiaoyu/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/wangxiaoyu/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: lxml in /Library/Python/2.7/site-packages (4.2.3)
prompt-toolkit 1.0.15 has requirement six>=1.9.0, but you'll have six 1.4.1 which is incompatible.