问题
I have recently installed PyCharm on my Raspberry Pi 3 b+ (Running version 9 [Stretch]) and I am having some trouble installing the googleapiclient package on PyCharm and the system.
When I perform a pip/pip3 install for this package I receive an error stating:
ERROR: Could not find a version that satisfies the requirement googleapiclient (from versions: none)
ERROR: No matching distribution found for googleapiclient
This is the same error message that I receive on PyCharm when it tries to do a pip install. Python 3.7.3 has been installed and 2.7.13 from default. PyCharm project interpreter is running 3.5. I have performed an apt-get update & upgrade also.
I have been able to successfully install other packages with pip/pip3 as well.
Am I missing any other packages/dependencies? Any help would be appreciated!
回答1:
I think you're just using the wrong name. Try pip install google-api-python-client
as specified here
回答2:
I've done it the next way:
- Created Pycharm project
- Created python file
Pasted the code example which started with:
from googleapiclient.discovery import build import pprint
Opened terminal in Pycharm:
- Removed old python2
venv
folder - Installed
python3-venv
package:sudo apt install python3-venv
- Created a new
venv
:python3 -m venv venv
- Executed the next commands:
$ source venv/bin/activate $ venv/bin/pip3 install google-api-python-client
After thisgoogleapiclient
have been recognized by Pycharm.
- Removed old python2
来源:https://stackoverflow.com/questions/56804061/cannot-install-googleapiclient-on-pycharm