ModuleNotFoundError: No module named 'google_auth_oauthlib' hatası

xxecexx

Femtopat
Katılım
15 Nisan 2023
Mesajlar
12
Daha fazla  
Cinsiyet
Kadın
ModuleNotFoundError: No module named 'google_auth_oauthlib' hatası alıyorum fakat
pip install google_auth_oauthlib
veya
pip install --upgrade google-auth-oauthlib
kullandığımda
Requirement already satisfied diyor.
Python:
# -*- coding: utf-8 -*-

# Sample Python code for youtube.channels.list
# See instructions for running these code samples locally:
# https://developers.google.com/explorer-help/code-samples#python

import os
import google_auth_oauthlib.flow
import googleapiclient.discovery
import googleapiclient.errors

scopes = ["https://www.googleapis.com/auth/youtube.readonly"]

def main():
    # Disable OAuthlib's HTTPS verification when running locally.
    # *DO NOT* leave this option enabled in production.
    os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"

    api_service_name = "youtube"
    api_version = "v3"
    client_secrets_file = "client_secrets.json"

    # Get credentials and create an API client
    flow = google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file(
        client_secrets_file, scopes)
    credentials = flow.run_local_server()
    youtube = googleapiclient.discovery.build(
        api_service_name, api_version, credentials=credentials)

    request = youtube.channels().list(
       
    )
    response = request.execute()

    print(response)

if __name__ == "__main__":
    main()

kod da bu şekilde
not: kod google'ın kendi örnek kodu henüz hiçbir değişiklik uygulamadım.
 
Son düzenleyen: Moderatör:

Yeni konular

Geri
Yukarı