Error unable to find vcvarsall bat

Python’s packaging ecosystem is one of its biggest strengths, but Windows users are often frustrated by packages that do not install properly. One of the most common errors you’ll see is this one: As far as errors go, “unable to find vcvarsall.bat”

April 11th, 2016

Python’s packaging ecosystem is one of its biggest strengths, but Windows users are often frustrated by packages that do not install properly. One of the most common errors you’ll see is this one:

Console window showing the 'Unable to find vcvarsall.bat' error.

As far as errors go, “unable to find vcvarsall.bat” is not the most helpful. What is this mythical batch file? Why do I need it? Where can I get it? How do I help Python find it? When will we be freed from this pain? Let’s look at some answers to these questions.

What is vcvarsall.bat, and why do I need it?

To explain why we need this tool, we need to look at a common pattern in Python packages. One of the benefits of installing a separate package is the ability to do something that you couldn’t normally do – in many cases, this is something that would be completely impossible otherwise. Like image processing with Pillow, high-performance machine learning with scikit-learn, or micro-threading with greenlet. But how can these packages do things that aren’t possible in regular Python?

The answer is that they include extension modules, sometimes called native modules. Unlike Python modules, these are not .py files containing Python source code – they are .pyd files that contain native, platform-specific code, typically written in C. In many cases the extension module is an internal detail; all the classes and functions you’re actually using have been written in Python, but the tricky parts or the high-performance parts are in the extension module.

When you see “unable to find vcvarsall.bat”, it means you’re installing a package that has an extension module, but only the source code. “vcvarsall.bat” is part of the compiler in Visual Studio that is necessary to compile the module.

As a Windows user, you’re probably used to downloading programs that are ready to run. This is largely due to the very impressive compatibility that Windows provides – you can take a program that was compiled twenty years ago and run it on versions of Windows that nobody had imagined at that time. However, Python comes from a very different world where every single machine can be different and incompatible. This makes it impossible to precompile programs and only distribute the build outputs, because many users will not be able to use it. So the culture is one where only source code is distributed, and every machine is set up with a compiler and the tools necessary to build extension modules on install. Because Windows has a different culture, most people do not have (or need) a compiler.

The good news is that the culture is changing. For Windows platforms, a package developer can upload wheels of their packages as well as the source code. Extension modules included in wheels have already been compiled, so you do not need a compiler on the machine you are installing onto.

When you use pip to install your package, if a wheel is available for your version of Python, it will be downloaded and extracted. For example, running pip install numpy will download their wheel on Python 3.5, 3.4 and 2.7 – no compilers needed!

I need a package that has no wheel – what can I do?

Firstly, this is become a more and more rare occurrence. The pythonwheels.com site tracks the most popular 360 packages, showing which ones have made wheels available (nearly 60% when this blog post was written). But from time to time you will encounter a package who’s developer has not produced wheels.

The first thing you should do is report an issue on the project’s issue tracker, requesting (politely) that they include wheels with their releases. If the project supports Windows at all, they ought to be testing on Windows, which means they have already handled the compiler setup. (And if a project is not testing on Windows, and you care a lot about that project, maybe you should to volunteer to help them out? Most projects do not have paid staff, and volunteers are always appreciated.)

If a project is not willing or able to produce wheels themselves, you can look elsewhere. For many people, using a distribution such as Anaconda or Python(x,y) is an easy way to get access to a lot of packages.

However, if you just need to get one package, it’s worth seeing if it is available on Christoph Gohlke’s Python Extension Packages for Windows page. On this page there are unofficial wheels (that is, the original projects do not necessarily endorse them) for hundreds of packages. You can download any of them and then use pip install (full path to the .whl file) to install it.

If none of these options is available, you will need to consider building the extension yourself. In many cases this is not difficult, though it does require setting up a build environment. (These instructions are adapted from Build Environment.)

First you’ll need to install the compiler toolset. Depending on which version of Python you care about, you will need to choose a different download, but all of them are freely available. The table below lists the downloads for versions of Python as far back as 2.6.

Python Version You will need
3.5 and later Update: Install Visual Studio 2017, select the Python development workload and the Native development tools option.
Visual C++ Build Tools 2015 or Visual Studio 2015
3.3 and 3.4 Windows SDK for Windows 7 and .NET 4.0
(Alternatively, Visual Studio 2010 if you have access to it)
2.6 to 3.2 Microsoft Visual C++ Compiler for Python 2.7

After installing the compiler tools, you should ensure that your version of setuptools is up-to-date.

For Python 3.5 and later, installing Visual Studio 2015 is sufficient and you can now try to pip install the package again. Python 3.5 resolves a significant compatibility issue on Windows that will make it possible to upgrade the compilers used for extensions, so when a new version of Visual Studio is released, you will be able to use that instead of the current one.

For Python 2.6 through 3.2, you also don’t need to do anything else. The compiler package (though labelled for “Python 2.7”, it works for all of these versions) is detected by setuptools, and so pip install will use it when needed.

However, if you are targeting Python 3.3 and 3.4 (and did not have access to Visual Studio 2010), building is slightly more complicated. You will need to open a Visual Studio Command Prompt (selecting the x64 version if using 64-bit Python) and run set DISTUTILS_USE_SDK=1 before calling pip install.

If you have to install these packages on a lot of machines, I’d strongly suggest installing the wheel package first and using pip wheel (package name) to create your own wheels. Then you can install those on other machines without having to install the compilers.

And while this sounds simple, there is a downside. Many, many packages that need a compiler also need other dependencies. For example, the lxml example we started with also requires copies of libxml2 and libxslt – more libraries that you will need to find, download, install, build, test and verify. Just because you have a compiler installed does not mean the pain ends.

When will the pain end?

The issues surrounding Python packaging are some of the most complex in our industry right now. Versioning is difficult, dependency resolution is difficult, ABI compatibility is difficult, secure hosting is difficult, and software trust is difficult. But just because these problems are difficult does not mean that they are impossible to solve, that we cannot have a viable ecosystem despite them, or that people are not actively working on better solutions.

For example, wheels are a great distribution solution for Windows and Mac OS X, but not so great on Linux due to the range of differences between installs. However, there are people actively working on making it possible to publicly distribute wheels that will work with most versions of Linux, such that soon all platforms will benefit from faster installation and no longer require a compiler for extension modules.

Most of the work solving these issues for Python goes on at the distutils-sig mailing list, and you can read the current recommendations at packaging.python.org. We are all volunteers, and so over time the discussion moves from topic to topic as people develop an interest and have time available to work on various problems. More contributors are always welcome.

But even if you don’t want to solve the really big problems, there are ways you can help. Report an issue to package maintainers who do not yet have wheels. If they don’t currently support Windows, offer to help them with testing, building, and documentation. Consider donating to projects that accept donations – these are often used to fund the software and hardware (or online services such as Appveyor) needed to support other platforms.

And always thank project maintainers who actively support Windows, Mac OS X and Linux. It is not an easy task to build, test, debug and maintain code that runs on such a diverse set of platforms. Those who take on the burden deserve our encouragement.

Problem Statement: How to fix “Error: Unable to find vcvarsall.bat” in Python?

In this tutorial, we will to look at what vcvarsall.bat is in Visual Studio Code and how/when the Error: Unable to find vcvarsall.bat occurs in Python. We will also look at different approaches to solve the error.

What is vcvarsall.bat?

vcvarsall.bat is a Visual Studio Command Prompt tool used in Visual Studio. The vcvarshall.bat tool allows you to set different options for the IDE (integrated development environment). Additionally, it also allows you to build, debug and deploy the projects from the command line. vcvarsall.bat is an essential part of the Visual Studio Code compiler and is necessary to compile a module.

How Does The Error: Unable to find vcvarsall.bat Occur in Python?

The error Unable to find vcvarsall.bat appears on Windows systems majorly when you try to install or build a Python package that contains C codes/libraries. When you get this error, it basically means that you are trying to install a package that has an extension module, but only the source code is present, and Python is unable to compile this code. As we learned above that vcvarsall.bat is an essential part of the Visual Studio Code compiler that is necessary to compile a module; this means if it is missing, then the source code is written in another language (C, C++) would not be compiled, and you will get the error – “Unable to find vcvarsall.bat.”

Example: Suppose we are trying to install the dulwich Python package:

pip install dulwich

Output:

error: Unable to find vcvarsall.bat

The same thing happens when you try to install the package manually using setup.py:

python setup.py install
running build_ext
building 'dulwich._objects' extension
error: Unable to find vcvarsall.bat

Note:

  • You can integrate any code written in a compiled language like C, C++, or Java into a Python script. This code will be considered as an extension.
  • An extension module in Python is simply a C library.
    • The extension of these libraries on Unix is .so (shared object).
    • The extension of these libraries on Unix is .dll (dynamically linked library).

Well, how do we overcome this problem? Let’s dive into the fixes that can help us to get rid of this error.

#Fix 1: Use Python or Canopy’s 32-bit version

One way to solve this error would be to properly install MS Visual C++ 2008, the compiler which is used to compile Python 2.x itself. To take precautions that the error does not occur, you should compile with the same length (32 bit or 64 bit) as the version of the Canopy or Python where you wish to utilize the compiled C code. The most affordable situation, regardless of whether you are on 32 bit or 64 bit Windows, is to utilize Canopy’s 32-bit version, which by and large has identical functionality to the 64-bit Canopy’s version, except if you are working with large data arrays.

Note: Before you install anything which requires the C extensions, you just need to run the following batch file that will load the VC++ compiler’s environment into the session

32-bit Compilers:

“C:Program Files (x86)Microsoft Visual Studio 9.0Common7Toolsvsvars32.bat”

64-bit Compilers:

The 64-bit compilers are in Program files.

“C:Program Files (x86)Microsoft Visual Studio 9.0Common7Toolsvsvars64.bat”

Note: The difference between vcvars64.bat and vcvarsx86_amd64.bat or the difference between amd64 and x86_amd64, is that the former is used for the 64-bit compiler tools, whereas the latter is used for the 64-bit cross compilers that can also run on a 32 bit Windows installation.

#Fix 2: Set The Correct path in The Environment Variable

While installing the package manually using setup.py, Python 2.7 searches for an installed version of Visual Studio 2008. While this happens, you can trick the Python compiler into using a newer version of Visual Studio by just setting the correct path in the environment variable (VS90COMNTOOLS) before calling the setup.py. After that, you can execute one of the following commands based on the version of the Visual Studio installed:

Visual Studio 2010 (VS10): SET VS90COMNTOOLS = %VS100COMNTOOLS%

Visual Studio 2012 (VS11): SET VS90COMNTOOLS = %VS110COMNTOOLS%

Visual Studio 2013 (VS12): SET VS90COMNTOOLS = %VS120COMNTOOLS%

Visual Studio 2015 (VS14): SET VS90COMNTOOLS = %VS140COMNTOOLS%

#Fix 3: Installing a Microsoft Compiler

Sometimes you can fix this error by installing a Microsoft compiler that is compatible with the compiler used to build Python to solve the error: Unable to find vcvarsall.bat. It implies that you will need to install Visual C++ 2008 or newer versions. The error is automatically solved after this as Microsoft provides us with a bundle of compilers and headers to be able to compile the Python extensions. When you search for “Microsoft C++ redistributable 2010” or similar, you will find a direct link to download it from Microsoft.

#Fix 4: Being Blocked by an Antivirus Program

The error: Unable to find vcvarsall.bat can also occur as a “configure error: cannot run C compiled programs” when you are trying to install the package manually using setup.py.

The above error occurs when the antivirus installed on your system is blocking the execution of the freshly compiled .exe. Hence to solve this error, you have to disable the antivirus resident shield. However, you may still face an error as shown below:

cc1.exe: error: unrecognized command line option '-mno-cygwin' 
error: command 'gcc' failed with exit status 1

To solve this error, you have to install an older version of MinGW, or go to the Python directory and edit the distutilscygwinccompiler.py and remove all the instances of -mno-cygwin.

#Fix 5: Adding mingw32’s bin Directory to The Environment variable

Another possible solution to this error is that you have to add the mingw32’s bin directory to an environment variable by appending the PATH with C:programsmingwbin;

Further, you have to create the distutils.cfg located at: C:Python27Libdistutilsdistutils.cfg containing –

[build]
Compiler = mingw32

To deal with the error- MinGW not recognizing the -mno-cygwin flag, you just have to remove the flag in C:Python27Libdistutilscygwincompiler.py as follows:

self.set_executables(compiler = 'gcc -O -Wall',
                         compiler_so = 'gcc -mdll -O -Wall',
                         compiler_cxx = 'g++ -O -Wall',
                         linker_exe =' gcc',
                         linker_so = '%s %s %s'
                                    % (self.linker_dll, shared_option,
                                       entry_point))

We have come to the end of our discussion here. I hope this tutorial helped you. Please stay tuned and subscribe for more interesting articles and discussions.

Article contributed by: Shubham Sayon and Rashi Agarwal


Where to Go From Here?

Enough theory. Let’s get some practice!

Coders get paid six figures and more because they can solve problems more effectively using machine intelligence and automation.

To become more successful in coding, solve more real problems for real people. That’s how you polish the skills you really need in practice. After all, what’s the use of learning theory that nobody ever needs?

You build high-value coding skills by working on practical coding projects!

Do you want to stop learning with toy projects and focus on practical code projects that earn you money and solve real problems for people?

🚀 If your answer is YES!, consider becoming a Python freelance developer! It’s the best way of approaching the task of improving your Python skills—even if you are a complete beginner.

If you just want to learn about the freelancing opportunity, feel free to watch my free webinar “How to Build Your High-Income Skill Python” and learn how I grew my coding business online and how you can, too—from the comfort of your own home.

Join the free webinar now!

shubham finxter profile image

I am a professional Python Blogger and Content creator. I have published numerous articles and created courses over a period of time. Presently I am working as a full-time freelancer and I have experience in domains like Python, AWS, DevOps, and Networking.

You can contact me @:

UpWork
LinkedIn

Table of Contents

Python error Unable to find vcvarsall.bat error is the most impressive problem I’ve encountered when installing Python packages on Windows platforms. This solution was compiled on September 10, 2012. Nine years have passed, and I believe there are still many of you who encountered similar problems. I took the time to recreate the previous solution and sort it out. The main change is to add the solution under Python2.

Problem Cause

If the package/module you installed has contents written in cpython, you need to compile the middle C code into a binary file before the installation can be completed successfully.

Solutions

Option 1: Select the compiled wheel file to install

Preparation: install wheel support, pip install wheel

Follow-up: find the corresponding .whl installation package (http://www.lfd.uci.edu/~gohlke/pythonlibs/)

Installation: Install directly using pip install xxx.whl, where xxx is the file path.

Caution.

  • Not all packages have corresponding binary packages because they are compiled by unofficial organizations.
  • When choosing a package, you need to determine the version of Python you are installing and whether the Python you are installing is 32-bit or 64-bit.

Option 2: Install Microsoft’s compilation environment Visual Studio

Python 2.6 to 3.2

Direct installation of Visual Studio 2008 (tested, ready to use without configuration) or Microsoft Visual C++ Compiler for Python 2.7 (not tested)

Python 3.3 and 3.4

Install Windows SDK for Windows 7 and .NET 4.0 (not tested) or Visual Studio 2010 (some configuration required after installation)

Open “<python installation directory>Libdistutilsmsvc9compiler.py”, modify the msvc9compiler.py file, and set: vc_env = query_vcvarsall(VERSION, plat _spec) set VERSION to the value corresponding to the installed version of VS.

  • VS2008, then VERSION is 0
  • VS2010, then VERSION is 0
  • VS2012, then VERSION is 0
  • VS2013, then VERSION is 0
  • VS2014, then VERSION is 0

Python 3.5 and later

Visual C++ Build Tools 2015 (not tested) or Visual Studio 2015

Option 3: Install MinGW compilation environment

Since installing Visual Studio takes up too much space, I personally prefer to install MinGW: * Download and install MinGW

  • Download and install MinGW

  • Find the bin folder under the installation directory of MinGW, find mingw32-make.exe, copy it and rename it to exe

  • add the path of MinGW to the environment variable path, for example, if I install MinGW into D:MinGW, add D:MinGWbin to the path.

  • Add the file cfg to <python installation directory>distutils, enter the following in the file and save it

    1
    2
    
    [build]
    compiler=mingw32
    
  • Execute the original module installation, found or error, the error content: error: command ‘gcc’ failed: No such file or directory Solution is to add D:MinGWlib to the PATH again.

  • If error: Could not find ‘openssl.exe’ appears during the installation process, download and install it directly from https://pypi.org/project/pyOpenSSL.

  • When installing the module when executing again, the following error is found.

    1
    2
    3
    4
    5
    
    D:MinGWbingcc.exe -mno-cygwin -mdll -O -Wall “-ID:Program FilesPython27inc
    lude” “-ID:Program FilesPython27include” “-ID:Program FilesPython27PC” -c
    ../libdasm.c -o buildtemp.win32-2.7Release..libdasm.o
    cc1.exe: error:unrecognized command line option ‘-mno-cygwin’
    error: command ‘gcc’ failed with exit status 1
    

The reason is that gcc 4.6.x no longer accepts -mno-cygwin after that. To fix this problem, you need to modify the <python installation directory>distutilscygwinccompiler.py file. Find.

1
2
3
4
5
6
7
self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
                             compiler_so='gcc -mno-cygwin -mdll -O -Wall',
                             compiler_cxx='g++ -mno-cygwin -O -Wall',
                             linker_exe='gcc',
                             linker_so='%s -mno-cygwin %s %s'
                                        % (self.linker_dll, shared_option,
                                           entry_point))

Modify to read:

1
2
3
4
5
6
7
self.set_executables(compiler='gcc -O -Wall',
                             compiler_so='gcc -mdll -O -Wall',
                             compiler_cxx='g++ -mno-cygwin -O -Wall',
                             linker_exe='gcc',
                             linker_so='%s -mno-cygwin %s %s'
                                        % (self.linker_dll, shared_option,
                                           entry_point))

Error Description:

  • If we try to install the Python package dulwich:
pip install dulwich
 
click below button to copy the code. By — python tutorial — team
  • we get a cryptic error message:
error: Unable to find vcvarsall.bat
 
click below button to copy the code. By — python tutorial — team
  • The same happens if we try installing the package manually:
> python setup.py install
running build_ext
building 'dulwich._objects' extension
error: Unable to find vcvarsall.bat
 
click below button to copy the code. By — python tutorial — team

Solution 1:

  • For Windows installations:
    While running setup.py for package installations, Python 2.7 searches for an installed Visual Studio 2008. We can trick Python to use a newer Visual Studio by setting the correct path in VS90COMNTOOLS environment variable before calling setup.py.
    Execute the following command based on the version of Visual Studio installed:
    • Visual Studio 2010 (VS10): SET VS90COMNTOOLS=%VS100COMNTOOLS%
    • Visual Studio 2012 (VS11): SET VS90COMNTOOLS=%VS110COMNTOOLS%
    • Visual Studio 2013 (VS12): SET VS90COMNTOOLS=%VS120COMNTOOLS%
    • Visual Studio 2015 (VS14): SET VS90COMNTOOLS=%VS140COMNTOOLS%

Solution 2:

  • We might have the exact same problem, and error, installing ‘amara’. We have mingw32 installed, but distutils needed to be configured.
    • Python 2.6 is already installed.
    • Install mingw32 to C:programsmingw
    • Add mingw32’s bin directory to our environment variable: append c:programsMinGWbin; to the PATH
    • Edit (create if not existing) distutils.cfg file located at C:Python26Libdistutilsdistutils.cfg to be:
[build]
compiler=mingw32
 
click below button to copy the code. By — python tutorial — team
  • Now run easy_install.exe amara.

Solution 3:

  • We’ll need to install a Microsoft compiler, compatible with the compiler used to build Python. This means we need Visual C++ 2008 (or newer, with some tweaking
  • Microsoft now supplies a bundled compiler and headers just to be able to compile Python extensions, at the memorable URL:

Microsoft Visual C++ Compiler for Python 2.7

Solution 4:

  • It all might start with this error when running setup.py install:
error: Unable to find vcvarsall.bat
 
click below button to copy the code. By — python tutorial — team
  • The problem is that then we get a different error:
configure: error: cannot run C compiled programs.
 
click below button to copy the code. By — python tutorial — team
  • It turns out that our anti-virus is blocking the execution of a freshly compiled .exe. We just need to disable the anti-virus «resident shield» and we might face the next error:
cc1.exe: error: unrecognized command line option '-mno-cygwin' 
error: command 'gcc' failed with exit status 1
 
click below button to copy the code. By — python tutorial — team
  • This will solve it: «Either install a slightly older version of MinGW, or edit distutilscygwinccompiler.py in Python directory to remove all instances of -mno-cygwin.»

Solution 5:

  • Add mingw32’s bin directory to environment variable: append PATH with C:programsmingwbin;
  • Create distutils.cfg located at C:Python27Libdistutilsdistutils.cfg containing:
[build]
compiler=mingw32
 
click below button to copy the code. By — python tutorial — team
  • To deal with MinGW not recognizing the -mno-cygwin flag anymore, remove the flag in C:Python27Libdistutilscygwincompiler.py line 322 to 326, so it looks like this:
  self.set_executables(compiler='gcc -O -Wall',
                         compiler_so='gcc -mdll -O -Wall',
                         compiler_cxx='g++ -O -Wall',
                         linker_exe='gcc',
                         linker_so='%s %s %s'
                                    % (self.linker_dll, shared_option,
                                       entry_point))
 
click below button to copy the code. By — python tutorial — team

У меня была эта проблема с использованием Python 3.4.1 на Windows 7 x64, и, к сожалению, у пакетов, которые мне были нужны, не было подходящих exe или колес, которые я мог бы использовать. Эта система требует нескольких «обходных решений», которые подробно описаны ниже (и TL;DR внизу).

Используя информацию в ответ Jaxrtech выше, я решил, что мне нужна Visual Studio С++ 2010 (sys.version return MSC v.1600), поэтому я установил Visual С++ 2010 Выразите из ссылки в его ответе, которая http://go.microsoft.com/?linkid=9709949. Я установил все с обновлениями, но, как вы можете прочитать ниже, это было ошибкой. В это время должна быть установлена ​​только оригинальная версия Express (ничего не обновляется).

vcvarsall.bat теперь присутствует, но при установке пакета произошла новая ошибка, query_vcvarsall raise ValueError(str(list(result.keys())))ValueError: [u'path']. С этой ошибкой возникают другие проблемы с stackoverflow, такие как Ошибки при сборке/установке модуля C для Python 2.7

Я определил из этого ответа, что в 2010 Express только устанавливаются 32-разрядные компиляторы. Чтобы получить 64-битные (и другие) компиляторы, вам необходимо установить Windows 7.1 SDK. См. http://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx

Это не установило меня, и установщик вернул ошибку installation failed with return code 5100. Я нашел решение по следующей ссылке: http://support.microsoft.com/kb/2717426. Короче говоря, если установлены более новые версии x86 и x64 Microsoft Visual С++ 2010 Redistributable, они конфликтуют с установками в установщике SDK и требуют деинсталляции в первую очередь.

Затем был установлен SDK, но я заметил, что vcvars64.bat все еще не существует в C:Program Files (x86)Microsoft Visual Studio 10.0VCbin, а также его подпапки. vcvarsall.bat запускает командный файл vcvars64, поэтому без него пакет python все равно не будет установлен (я забыл об ошибке, которая была показана в это время).

Затем я нашел несколько инструкций здесь: http://www.cryptohaze.com/wiki/index.php/Windows_7_Build_Setup#Download_VS_2010_and_Windows_SDK_7.1
Следуя инструкциям, я уже установил Express и 7.1 SDK, поэтому установил SDK 7.1 SP1 и исправил недостающий файл заголовка. Затем я вручную создал vcvars64.bat с содержимым CALL setenv /x64. Здесь я вложу все эти инструкции, чтобы они не потерялись.

Шаг 1 — загрузить Visual Studio Express 2010.

http://www.microsoft.com/visualstudio/en-us/products/2010-editions/expressэто хорошее место для начала. Загрузите программу установки и запустите ее (Vc_web.exe). Вам не нужна дополнительная загрузка SQL 2008.

Вам также понадобится Windows SDK (в настоящее время 7.1) для 64-разрядного компиляторы — если вы не хотите делать только 32-битные сборки, которые не являются полностью поддерживается…

http://www.microsoft.com/en-us/download/details.aspx?id=8279 является хорошим отправной точкой для загрузки — вы хотите запустить winsdk_web.exe при загрузке!

Установленная по умолчанию установка просто прекрасна.

Наконец, загрузите и установите обновление Windows SDK 7.1 SP1: http://www.microsoft.com/en-us/download/details.aspx?id=4422

И, чтобы исправить недостающий файл заголовка, VS2010 SP1. http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5

И, черт возьми, исправьте отсутствующий командный файл для VS2010 Express. Эта становится совершенно абсурдным.

В C:Program Files (x86)Microsoft Visual Studio 10.0VCbinamd64, создайте «vcvars64.bat» со следующим (вам нужно будет работать как администратор):

CALL setenv/x64

Мой пакет python все еще не установил (не могу вспомнить ошибку). Затем я нашел некоторые инструкции (скопированные ниже) для использования специальной командной строки SDK 7.1: https://mail.python.org/pipermail/distutils-sig/2012-February/018300.html

Не обращай внимания на этот вопрос. Кто-то здесь заметил этот пункт в меню: Пуск- > Все программы- > Microsoft Windows SDK v7.1 → Windows SDK 7.1 Командная строка

Это запускает пакетное задание, которое, как представляется, настраивает рабочую среду для компилятора. Из этого приглашения вы можете ввести «setup.py build» или «setup.py install».

Я открыл командную строку Windows SDK 7.1 в соответствии с инструкциями и использовал ее для запуска easy_install в пакете python. И наконец, успех!


TL;DR;

  • Установите Visual Studio Express 2010 (желательно без обновленных распространяемых компонентов или SQL-сервера).
  • Установка SDK Windows 7.1
  • Обновление Instal SDK 7.1 SP1 и исправление файла заголовка VS2010 SP1 (этот шаг может не потребоваться).
  • Вручную создайте C:Program Files (x86)Microsoft Visual Studio 10.0VCbinamd64vcvars64.bat с контентом CALL setenv /x64
  • Пуск- > Все программы- > Microsoft Windows SDK v7.1 → Windows SDK 7.1 Командная строка, чтобы открыть специальную командную строку x64, которая затем может использоваться с python/easy_install/pip/etc (в том числе в virtual_envs).

Понравилась статья? Поделить с друзьями:
  • Error unable to find git in your path flutter windows
  • Error unable to find an ini file please reinstall skyrim special edition
  • Error unable to find a match pygpgme
  • Error unable to find a bootable option lumia
  • Error unable to execute seq maple