Solved

building python packages vcvarsall

Posted on 2014-03-18
6
990 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 15

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 15

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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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 15

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# code editing and collaboration 3 99
Creating 2 files from output with Powershell 5 37
iframe detection of parent window scale 20 60
change the windows script file to BAT 10 30
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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 dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now