![](/img/trans.png)
[英]ImportError: cannot import name 'set_random_seed' from 'tensorflow' (C:\Users\polon\Anaconda3\lib\site-packages\tensorflow\__init__.py)
[英]ImportError: cannot import name 'TwitterRestPager' from 'TwitterAPI' (C:\Users\My name \Anaconda3\lib\site-packages\TwitterAPI\__init__.py)
我正在嘗試導入TwitterRestPager
,但不斷收到錯誤消息:
"cannot import name 'TwitterRestPager' from 'TwitterAPI' (C:\Users\My
name\Anaconda3\lib\site-packages\TwitterAPI\__init__.py) "
--(文件路徑中的我的名字是我的實際名字,只是出於隱私目的被替換了)
我已經更新了 requests 和TwitterApi
。
這是我試圖運行的代碼:
! pip install TwitterAPI
! pip install TwitterAPI --upgrade
from TwitterAPI import TwitterRestPager
您可以改用 TwitterPager。 看起來 TwitterRestPager 在較新版本中已折舊(可在 TwitterAPI 2.4.1https://pydoc.net/TwitterAPI/2.4.1/TwitterAPI.TwitterRestPager/ 中使用)
如果 TwitterRestPager 在其中,請檢查站點包。 如果不是,並且pip沒有正確安裝它,請嘗試在線查找腳本或文件,並將其下載到從中導入的目錄。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.