【发布时间】:2017-10-28 22:55:00
【问题描述】:
我尝试导入 tweepy 库,但收到以下错误消息:
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
import tweepy
ImportError: No module named 'tweepy'
在python文件中我得到这个消息,我不知道这两个消息是否相关
Python 3.5.0 (v3.5.0:374f501f4567, Sep 12 2015, 11:00:19)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.
Visit http://www.python.org/download/mac/tcltk/ for current information.
【问题讨论】:
-
错误提示您正在导入 tweedy,而不是 tweepy...
-
实际上 safari 将其纠正为“tweedy”。但我导入 tweepy
-
你安装了 tweepy 吗?试试
pip install tweepy -
是的,我已经安装了
-
您可能安装了多个版本的 python。你是如何开始 python 的,使用 python、python3 或其他东西?