控制台命令
查看已安装包
!pip list
查看版本
!python --version
Python 2.7.11 :: Anaconda 2.4.1 (64-bit)
报错处理
1.ImportError: No module named html.parser
https://docs.python.org/2/library/htmlparser.html
原因:原来是python3的写法,修改下述即可。
修改from HTMLParser import HTMLParser
2.ImportError: No module named docx
http://python-docx.readthedocs.io/en/latest/user/install.html
!pip install python-docx
!pip install python-docx
Collecting python-docx
Requirement already satisfied (use --upgrade to upgrade): lxml>=2.3.2 in c:\anaconda2\lib\site-packages (from python-docx)
Installing collected packages: python-docx
Successfully installed python-docx-0.8.6
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command.
时间: 2024-12-28 00:54:45