Trouble installing some libraries in python (oauth2client and gspread)

纵饮孤独 提交于 2021-01-28 10:19:09

问题


I'm using python 3.7 (environment created by anaconda) and trying to run python code that uses some google libraries but I don't really know how to install them.

From PyCharm IDE (Settings -> Project Interpreter -> Available Packages) I cannot find those packages to install. And from terminal, running 'pip install --upgrade oauth2client' or 'pip3 install --upgrade oauth2client' doesn't seem to work either.

What I don't understand is: to install packages/libraries on python 3.x, should i only use pip3? But what if there is more than one python environment? On which one pip will install those libraries?


回答1:


If you're using Anaconda, you should also have an Anaconda Prompt (py37) program that functions like the terminal. Typing pip install --upgrade oauth2client into Anaconda Prompt (py37) will install the upgrade into your current python environment. Alternatively, you can use conda install with more options (including specifying which environment you want).



来源:https://stackoverflow.com/questions/56808385/trouble-installing-some-libraries-in-python-oauth2client-and-gspread

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!