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.

Job Royd
  • 21
  • 2
  • 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? – Andersson Jun 18 '15 at 16:17
  • @Andersson I got logged out and couldn't log back in, but here's the traceback I'm getting: http://pastebin.com/PUDtmkvk – Job Royd Jun 18 '15 at 16:41
  • but this is totally different issue – Andersson Jun 18 '15 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. – Job Royd Jun 18 '15 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 – Andersson Jun 18 '15 at 17:04
  • Possible duplicate of [ImportError: No module named apiclient.discovery](http://stackoverflow.com/questions/18267749/importerror-no-module-named-apiclient-discovery) – avrsanjay Nov 08 '16 at 16:29

1 Answers1

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
Community
  • 1
  • 1
user1567004
  • 175
  • 1
  • 8