RDFLib/rdflib — Issue #98: "Unable to find vcvarsall.bat" error when trying to install rdflib-2.4.2 with Python 2.6.4 and Windows 7 x64
Author: gjhiggins
Created: 2012-02-20 08:32:40+00:00
State: open

mongrelu...@gmail.com, 2010-01-28T14:02:50.000Z

What steps will reproduce the problem?
1. Try and install rdflib 2.4.2 using easy_install from the command prompt
by issuing the command "easy_install -U "rdflib==2.4.2""

What is the expected output? What do you see instead?
- I expect that it will install smoothly.

- What I actually see is:

Searching for rdflib==2.4.2
Reading http://pypi.python.org/simple/rdflib/
Reading http://rdflib.net/
Best match: rdflib 2.4.2
Downloading http://rdflib.net/rdflib-2.4.2.tar.gz
Processing rdflib-2.4.2.tar.gz
Running rdflib-2.4.2\setup.py -q bdist_egg --dist-dir
c:\users\brycet~1\appdata\
local\temp\easy_install-st4_nc\rdflib-2.4.2\egg-dist-tmp-qjaet5
warning: no files found matching 'example.py'
error: Setup script exited with error: Unable to find vcvarsall.bat

What version of the product are you using? On what operating system?
rdflib 2.4.2
Python 2.6.4
Windows 7 x64

Please provide any additional information below.
- I did some reading and found a suggestion to try installing the Visual
C++ redistributable. I found and installed both x86 and x64 versions of
the redistributable but this did not change anything.
- I read somewhere that an error somewhat similar to this existed in Python
version 2.6.3 due to a regression but was fixed in Python 2.6.4. Given
that I'm running Python 2.6.4, this should not have affected me.

Comment 1 by eik...@gmail.com
This will not be an issue in rdflib 2.5.x as we have switched to using pure python for the sparql parser
implementation.

Comment 2 by eik...@gmail.com

Comment 3 by eik...@gmail.com

Comment 4 by mongrelu...@gmail.com
Good to hear that it won't be a problem in 2.5.x.

In the meantime I found a workaround which is to install minGW32 and compile it with
that. So for anyone with a similar problem:

1. Download minGW32 installer from sourceforge
2. When you install the tool and get the screen asking what components to install,
select "MinGW base tools", "g++ compiler" and "MingW make".
3. After MinGW is installed, add C:\MinGW\bin to your Path environment variable
4. Create a file in C:\Python26\Lib\distutils and call it distutils.cfg
5. In this file, put the following:

[build]
compiler=mingw32

This way easy_install will try and use mingw32 as the compiler when you install
rdflib.

6. Run the easy_install command again: easy_install -U "rdflib==2.4.2"

And hopefully you're all good.

Comment 5 by eik...@gmail.com
This will no longer be an issue starting with rdflib 2.5.0. At this time, we are not planning on fixing this for
2.4.x.

Comment 6 by a.celeje...@gmail.com
why am i getting runtime error: can't find a version in Winodows.h when i try this workaround?

Comment 7 by a.celeje...@gmail.com
why am i getting runtime error: can't find a version in Winodows.h when i try this workaround?

Comment 9 by Alec.Tay...@gmail.com
#>easy_install mercurial
Searching for mercurial
Reading http://pypi.python.org/simple/mercurial/
Reading http://mercurial.selenic.com/
Reading http://www.selenic.com/mercurial
Best match: mercurial 1.9.1
Downloading http://mercurial.selenic.com/release/mercurial-1.9.1.tar.gz
Processing mercurial-1.9.1.tar.gz
Running mercurial-1.9.1\setup.py -q bdist_egg --dist-dir c:\users\alec~1\appda
ta\local\temp\easy_install-ohxbqg\mercurial-1.9.1\egg-dist-tmp-sd92rn
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: Setup script exited with error: command 'gcc' failed with exit status 1

Comment 10 by gromgull
Alec - your bug has nothing to do with rdflib - you are in the wrong place :)

Your solution is to install cygwin, and otherwise look at the mercurial homepage for mercurial support.

Cheers,

- Gunnar