概述
>>> import itchat
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/xxxxx/Desktop/itchat.py", line 3, in <module>
from itchat.content import TEXT
ModuleNotFoundError: No module named 'itchat.content'; 'itchat' is not a package
pip --version
查看pip路径
t41:itchat xxxx$ pip --version
pip 9.0.1 from /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg (python 2.7)
t41:itchat xxxx$ pip3 --version
pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (python 3.6)
本想记录问题处理的流程,
不知道怎么回事!!!
在python3中重新 import itchat 不报错了。。。。。
t41:site-packages xxxx$ python3
Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import itchat
>>>
不管了!
最后
以上就是明理心锁为你收集整理的Mac下ImportError: No module named content/ModuleNotFoundError: No module named 'itchat.content';的全部内容,希望文章能够帮你解决Mac下ImportError: No module named content/ModuleNotFoundError: No module named 'itchat.content';所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复