[英]python3 install module apiclient error in Jupyter notebooks
我正在嘗試將google analytics API
連接到我的Jupyter筆記本,當我嘗試安裝庫時出現錯誤。
import argparse
from apiclient.discovery import build
from oauth2client.service_account import ServiceAccountCredentials
import httplib2
from oauth2client import client
from oauth2client import file
from oauth2client import tools
錯誤返回:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-4-4f9f833c28f1> in <module>()
1 import argparse
2
----> 3 from apiclient.discovery import build
4 from oauth2client.service_account import ServiceAccountCredentials
5
ModuleNotFoundError: No module named 'apiclient'
我基本上使用這個演示 ,當我在終端中將它作為python應用程序運行時它工作但是當我將代碼移動到jupyter時它開始拋出該錯誤。
我試過了:
pip3 install --upgrade google-api-python-client
在終端中一切都是最新的
!pip3 install google-api-python-client
在筆記本中!pip3 install google-api-python-client
並返回一切都是最新的。
我使用anaconda進行本地jupyter安裝,如果這有任何區別。 關於如何解決這個或其他事情的任何想法嘗試?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.