Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

building python packages vcvarsall

Posted on 2014-03-18
6
Medium Priority
?
1,032 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

671 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