Python install module apiclient

New to python and attempt to install the "apiclient" module since my ide pycharm does not recognize this import:

from apiclient.discovery import build 

what i tried:

  • pip install apiclient
  • manually download the package from

https://developers.google.com/api-client-library/python/start/installation#system-requirements then I extracted it in

 /Users/nirregev/anaconda/bin/google-api-python-client-1.5.0 

and ran it on my mac terminal Installing python setup.py but still pycharm does not recognize this module. According to pycharm, I have the following interpreters installed:

 /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 /Users/nirregev/anaconda/bin/python /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 
+7
python pip install google-api apiclient
source share
4 answers

Try the following:

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

OR

Make sure you only have google-api-python-client installed. If you have apiclient installed, this will cause a collision. So run the following:

 pip install --force-reinstall google-api-python-client 

Response source

+7
source share

If you have python3 installed somewhere and you need to install apiclient, you can install it in the python3 directory. I had the same problem, and when I uninstalled python3, my program worked smoothly.

+1
source share

I ran into this problem and it was hard for me to figure it out. In the end, it worked for me:

pip install google-api-python-client==1.5.3

Before doing this, I installed version 1.6.2. I think later versions of google-api-python-client dropped apiclient in favor of the googleapiclient alias; which is a problem because some packages (like airflow) still use this apiclient.discovery import.

Hope this helps.

+1
source share

If you have both python 2 and python 3 and you are trying to use python 2 for this purpose, try the following: sudo pip2 install google-api-python-client==1.5.3 . It worked for me.

0
source share

All Articles