Solved

building python packages vcvarsall

Posted on 2014-03-18
6
996 Views
Last Modified: 2014-03-25
I am trying to build and install;

https://pypi.python.org/pypi/pycrypto

on a windows 7 machine. I downloaded the tar.gz, unzipped it (this is python 2.7) and ran the command c:\python27\python.exe setup.py build

but it is giving errors about unable to find vcvarsall.bat?
Are there pre-requirements for installing and building python packages on windows 7 machines?
0
Comment
Question by:pma111
  • 3
  • 2
6 Comments
 
LVL 16

Accepted Solution

by:
Walter Ritzel earned 250 total points
ID: 39937739
The problem is related to a dependency python has with a c compiler, in this case, the one from Visual Studio 2008.

You can fool Python with a newer Visual Studio version by setting the correct path in VS90COMNTOOLS environment variable before calling setup.py.

If you have Visual Studio 2010 installed:
SET VS90COMNTOOLS=%VS100COMNTOOLS%

If you have Visual Studio 2012 installed:
SET VS90COMNTOOLS=%VS110COMNTOOLS%

If you have Visual Studio 2013 installed:
SET VS90COMNTOOLS=%VS120COMNTOOLS%

Please try this and let me know.
Regards,
Walter.
0
 
LVL 16

Expert Comment

by:Walter Ritzel
ID: 39937745
Searching a little more, it seems a less manual way to fix this:
http://stackoverflow.com/questions/19689652/unable-to-find-vcvarsall-bat-using-python-2-7

Regards,
Walter.
0
 
LVL 3

Author Comment

by:pma111
ID: 39939426
can you download the express version, or does python require the full paid version of VS?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 3

Author Comment

by:pma111
ID: 39939452
The 2nd solution lost me a bit, is setenv a python specific command? Or linked to visual studio?
0
 
LVL 9

Assisted Solution

by:techtonik
techtonik earned 250 total points
ID: 39939581
The common practice for Windows is to install pre-compiled binary packages, so you won't have to buy VS to compile them. Usually they are available from PyPI pages, but pycrypto is restricted by US, so I'd just download and install it from here http://www.voidspace.org.uk/python/modules.shtml#pycrypto
0
 
LVL 16

Expert Comment

by:Walter Ritzel
ID: 39940735
In fact, you dont need visual studio itself. If you can download the .NET distribution (just the framework dlls, etc), should be enough.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question