python apiclient installation

186 views
Skip to first unread message

Liran Cohen

unread,
Feb 29, 2016, 11:44:08 AM2/29/16
to Google API Python Client
Hi,
I'm using a mac. I tried installing the apiclient with both pip and easy_install but when i try to import the module in python console I get this error:

>>> import apiclient

usage: [-h] -u U

: error: argument -u is required


and the python console terminates.

Has anyone came across this problem?

I'd appreciate any kind of help..

Thanks,

Liran.

Nathaniel Manista

unread,
Feb 29, 2016, 7:06:25 PM2/29/16
to google-api-p...@googlegroups.com
Do you happen to know what version of google-api-python-client you are using? How certain are you that you're using google-api-python-client and not an unrelated library by the name of "apiclient"?
-Nathaniel

Liran Cohen

unread,
Mar 1, 2016, 9:04:12 AM3/1/16
to Google API Python Client
Hi Nathaniel,
Thanks for responding.
I've installed the module this way:

$ sudo pip install google-api-python-client

 

Password:

The directory '/Users/Shirkan/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

The directory '
/Users/Shirkan/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Requirement already satisfied (use --upgrade to upgrade): google-api-python-client in /usr/local/lib/python2.7/site-packages

Requirement already satisfied (use --upgrade to upgrade): six<2,>=1.6.1 in /usr/local/lib/python2.7/site-packages/six-1.10.0-py2.7.egg (from google-api-python-client)

Requirement already satisfied (use --upgrade to upgrade): oauth2client<3,>=2.0.0 in /usr/local/lib/python2.7/site-packages (from google-api-python-client)

Requirement already satisfied (use --upgrade to upgrade): httplib2<1,>=0.8 in /usr/local/lib/python2.7/site-packages/httplib2-0.9.2-py2.7.egg (from google-api-python-client)

Requirement already satisfied (use --upgrade to upgrade): uritemplate<1,>=0.6 in /usr/local/lib/python2.7/site-packages/uritemplate-0.6-py2.7.egg (from google-api-python-client)

Requirement already satisfied (use --upgrade to upgrade): pyasn1-modules>=0.0.5 in /usr/local/lib/python2.7/site-packages/pyasn1_modules-0.0.8-py2.7.egg (from oauth2client<3,>=2.0.0->google-api-python-client)

Requirement already satisfied (use --upgrade to upgrade): rsa>=3.1.4 in /usr/local/lib/python2.7/site-packages (from oauth2client<3,>=2.0.0->google-api-python-client)

Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.7 in /usr/local/lib/python2.7/site-packages/pyasn1-0.1.9-py2.7.egg (from oauth2client<3,>=2.0.0->google-api-python-client)

Requirement already satisfied (use --upgrade to upgrade): simplejson>=2.5.0 in /usr/local/lib/python2.7/site-packages (from uritemplate<1,>=0.6->google-api-python-client)


Though I'm not quite sure I'm using the google-api-python-client when I try to "import apiclient" - How can I validate it?

Thanks,

Liran.


Liran Cohen

unread,
Mar 2, 2016, 12:06:34 PM3/2/16
to Google API Python Client
It looks like some module is missing/conflicts.
I've installed it to python3 and it works alright.
How can I fix it to work with python 2.7 as well?
Thanks.
Reply all
Reply to author
Forward
0 new messages