【发布时间】:2017-07-01 02:34:48
【问题描述】:
安装了 Anaconda,但它似乎没有 Instagram 模块。我安装了 python,因为我的计算机上没有路径目录并手动添加了 instagram 模块。尝试使用以下代码在 Anaconda 的 Spyder 和 Python 的 shell 中运行我的程序:
从 instagram.client 导入 InstagramAPI
access_token = "
client_secret = "
api = InstagramAPI(access_token=access_token, client_secret=client_secret)
recent_media, next_ = api.user_recent_media(user_id="userid", count=10)
for media in recent_media:
print (media.caption.text)
但总是报错(文件名为'main.py')
from instagram.client import InstagramAPI
ModuleNotFoundError: No module named 'instagram'
【问题讨论】:
标签: python module instagram instagram-api