Solved

building python packages vcvarsall

Posted on 2014-03-18
6
980 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
A short article about problems I had with the new location API and permissions in Marshmallow
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

708 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

12 Experts available now in Live!

Get 1:1 Help Now