2

I'm fairly new to Python so this maybe really simple. I'm wanting to use the YouTube API to pull my latest YouTube videos. The problem is Python isn't allowing me to do so. I'm running Python version 2.7.6

I've used pip to install the Google dependencies:

$ pip install --upgrade google-api-python-client

To no avail, I'm still getting the following problem:

Unresolved reference 'build'

The code I'm using is: https://developers.google.com/youtube/v3/code_samples/python#retrieve_my_uploads

I'm wondering if anybody has come across this. I'm using PyCharm as my IDE for OS X. I've searched and searched and can't find a solution. I've tried Python versions: 2.6.9, 2.7.6, 3.4.2

I'd really appreciate some advice.

6
  • Python API client was successfully installed and when you try to import it in PyCharm (something like from apiclient.discovery import build) you get trace, right? Commented Jun 18, 2015 at 16:17
  • @Andersson I got logged out and couldn't log back in, but here's the traceback I'm getting: pastebin.com/PUDtmkvk Commented Jun 18, 2015 at 16:41
  • but this is totally different issue Commented Jun 18, 2015 at 16:56
  • I don't understand why this just isn't working. All I've done is followed the instructions from the YouTube API. Commented Jun 18, 2015 at 17:00
  • If you can not re-log in to your account, try to re-open new Question with part of code you already have wrote Commented Jun 18, 2015 at 17:04

1 Answer 1

8

Checkout the following answer : ImportError: No module named apiclient.discovery

apiclient was the original name of the library.

At some point, it was switched over to be googleapiclient.

# bad
from apiclient.discovery import build

# good
from googleapiclient.discovery import build
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.