Python无法安装包 [英] Python Can't install packages

查看:89
本文介绍了Python无法安装包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Python 上安装包,但 Python 在安装包时抛出错误.每次尝试安装 pip install google-search-api 时都会出错.

这里是错误我怎样才能成功安装它?

错误:需要 Microsoft Visual C++ 14.0 或更高版本.使用Microsoft C++ 构建工具"获取它:https://visualstudio.microsoft.com/visual-cpp-build-tools/

我已经更新了它并拥有 14.27 的最新版本,但问题是抛出相同的错误.

解决方案

转到

一旦你打开它,它可能需要一些其他的步骤,但很明显,只需跟着它走.

您会看到您可能有这样的东西,只需下载或恢复即可.

如果上面的更新不起作用,那么您需要在此处进行配置或进行一些更新.您也可以在这里进行一些更新,我点击修改".

检查并在那里下载您需要的内容,或者您​​可能在那里发现您只需要按照错误所述更新Microsoft Visual C++,但我还建议更新那里的所有内容您可能在未来的程序中仍然需要它,我认为那些使用 C++ 的人,就像我以前做过的那样,并且在安装用于创建


更新:2020 年 12 月 28 日

您也可以在此处执行此步骤

选择:工作负载 → 使用 C++ 进行桌面开发,然后对于单个组件,仅选择:

  • Windows 10 SDK
  • C++ x64/x86 构建工具

来源这里

I'm trying to install a package on Python, but Python is throwing an error on installing packages. I'm getting an error every time I tried to install pip install google-search-api.

Here is the error how can I successfully install it?

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ 

I already updated that and have the latest version of 14.27 but the problem is throwing same error.

解决方案

Go to the link and download this , if you have it then just open it

Once you open it, it might take some other steps but it's obvious and just go with it.

You'll see you might have something like this, just download it or resume.

If updating above doesn't work then you need to configure or make some updates here. You can make some updates here too my clicking "Modify".

Check that and download what you need there or you might found there that you just need to update Microsoft Visual C++ as stated on the error, but I also suggest to update everything there cause you might still need it on your future programs, I think those with the C++ as I've done that before and had a similar problem just like that when installing a python package for creating WorldCloud visualization.


UPDATE: December 28, 2020

You can also follow this steps here

Select: Workloads → Desktop development with C++, then for Individual Components, select only:

  • Windows 10 SDK
  • C++ x64/x86 build tools

Source here

这篇关于Python无法安装包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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