我正在使用 mac 并使用 pip 安装 python-docx。我进入 C:\Python27\Scripts 并运行
pip install python-docx
我觉得应该已经安装好了
但是当我运行一个简单的导入
from docx import Documents
它遇到了一个
ImportError: No module named docx
当我检查使用 pip 安装的模块时
pip list
python-docx 0.8.11 已安装。
为什么会这样?
请尝试安装
python-docx
:
$ pip uninstall docx
$ pip install python-docx