无法在python中安装某些库(oauth2client和gspread) [英] Trouble installing some libraries in python (oauth2client and gspread)

查看:59
本文介绍了无法在python中安装某些库(oauth2client和gspread)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用python 3.7(anaconda创建的环境),并尝试运行使用某些Google库的python代码,但我真的不知道如何安装它们.

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.

在PyCharm IDE中(设置->项目解释器->可用软件包),我找不到要安装的软件包.从终端运行"pip install --upgrade oauth2client"或"pip3 install --upgrade oauth2client"似乎也不起作用.

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.

我不明白的是:要在python 3.x上安装软件包/库,我应该只使用pip3吗?但是,如果存在多个python环境,该怎么办?将在哪个pip上安装这些库?

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?

推荐答案

如果您使用的是Anaconda,则还应该有一个Anaconda Prompt(py37)程序,其功能类似于终端.在Anaconda Prompt(py37)中输入 pip install --upgrade oauth2client 会将升级安装到当前的python环境中.或者,您可以将 conda install 与更多的

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).

这篇关于无法在python中安装某些库(oauth2client和gspread)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆