如何修复PyCharm上的vcvarsall错误? [英] How to fix the vcvarsall error on PyCharm?

查看:223
本文介绍了如何修复PyCharm上的vcvarsall错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是64位Windows 7 SP1.我有带有Python 3.4.2的PyCharm Community Edition 4.0.4.我想在PyCharm中安装新软件包.

I am on 64-bit Windows 7 SP1. I have PyCharm Community Edition 4.0.4 with Python 3.4.2. I want to install new packages in PyCharm.

在PyCharm中,当我转到File -> Settings -> Project -> Project Interpreter时,将获得项目中的软件包列表,该软件包最初具有piprequestssetuptools. pipsetuptools非常过时,因此我通过单击此列表右侧的蓝色小箭头来更新它们.现在是pip 6.1.1setuptools 15.0.

In PyCharm, when I go to File -> Settings -> Project -> Project Interpreter I get a list of packages in the project, which initially has pip, requests and setuptools. pip and setuptools were very outdated so I updated them by clicking the little blue arrow on the right of this list. They are now pip 6.1.1 and setuptools 15.0.

当我尝试安装软件包时:

When I try to install a package:

  1. 点击绿色加号图标
  2. Available Packages窗口中,选择需要C编译器的软件包(例如line_profiler)
  3. 在列表中选择它
  4. 点击左下角的Install Package按钮
  1. Click green plus icon
  2. In the Available Packages window, select a package that requires a C compiler (eg. line_profiler)
  3. Select it in the list
  4. Click the Install Package button in bottom left

我得到一个错误.如果我查看错误详细信息,基本上相关的行是这样的:

I get an error. If I look at error details, basically the relevant line is this:

    error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

肯定有办法在PyCharm 中修复此吗?我已经看到设置VS90COMNTOOLS可以使用,但是我不知道在哪里输入.PyCharm Python控制台? Available Packages窗口中的Options? PyCharm中是否还有其他晦涩的选项屏幕?

Surely there is a way to fix this within PyCharm? I've seen that setting VS90COMNTOOLS can work but I don't understand where to type it in. PyCharm Python console? Options in the Available Packages window? Some other obscure option screen in PyCharm?

顺便说一句,我已经安装了Visual Studio 2013.我不想卸载它或做任何其他使它无法使用的事情.如果可能的话,我也不希望浪费空间仅为C编译器安装整个IDE(安装VS2010"解决方案).该解决方案不应特定于VS2013-否则我将不得不再次返回,以在发布VS2015时问同样的问题.

By the way, I have Visual Studio 2013 installed. I don't want to uninstall it or do anything else that will make it unusable. If possible I'd like to not waste space installing a whole IDE just for the C compiler, either (the "install VS2010" solution). The solution should not be VS2013 specific - or I'd have to come back again to ask the same question when VS2015 is released.

推荐答案

如果您像我一样,并且您正在寻找一种快速安装这些软件包的方法.一种非常快速的选择是安装 Activepython 发行版.

If you are at all like me, and you are just looking for a quick way to get those packages to just install. A very quick option is to install the Activepython distribution.

此软件包管理器"pypm"附带提供了此功能,可以解决此问题.您将需要从命令行安装软件包,但这非常简单.您所描述的错误几乎使我发疯,这种方法确实以最快的方式解决了它.

This comes included with a package manager 'pypm' that gets around this issue. You will need to install your packages from the command-line but this is extremely straightforward. The error you are describing drove me almost insane and this method really does get around it in the fastest possible manner.

这篇关于如何修复PyCharm上的vcvarsall错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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