Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

building python packages vcvarsall

Posted on 2014-03-18
6
Medium Priority
?
1,042 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 1000 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 1000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to count occurrences of each item in an array.
Progress
Suggested Courses

886 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