error: Unable to find vcvarsall.bat (win64, vs express 2008 installed)

3,074 views
Skip to first unread message

valentij...@gmail.com

unread,
Feb 8, 2013, 5:09:12 PM2/8/13
to rhod...@googlegroups.com
Hello,

When installing Rhodecode on windoes 2008 server 64 bit I am running into a problem.

The pip install rhodecore command fails with the dreaded vcvarsall.bat error:

building 'dulwich._objects' extension
error: Unable to find vcvarsall.bat

Normally this means you should install Visual Studio 2008, but I already did that.
I also installed Windows Software Development kit to get 64-bit support.

The environment variables are setup correctly (I believe):

VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\
VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0

The vcvarsall.bat does exist:

(Env) E:\Rhodecode\Env\Scripts>dir "c:\Program Files (x86)\Microsoft Visual Stud
io 9.0\VC"\*.bat
 Volume in drive C has no label.
 Volume Serial Number is 4474-16EC

 Directory of c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC

05-01-2005  16:51             1.247 vcvarsall.bat

The 64 bit stuff is also there:

 Directory of c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin
30-07-2008  12:05           129.520 cl.exe
               1 File(s)        129.520 bytes

 Directory of c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64
30-07-2008  13:58           153.584 cl.exe
               1 File(s)        153.584 bytes

 Directory of c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\x86_amd64
30-07-2008  14:11           128.496 cl.exe
               1 File(s)        128.496 bytes

 Directory of c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\x86_ia64
30-07-2008  14:11           124.912 cl.exe
               1 File(s)        124.912 bytes

Any idea why pip cannot find the vcvarsall.bat ???

valentij...@gmail.com

unread,
Feb 8, 2013, 5:47:27 PM2/8/13
to rhod...@googlegroups.com
This post seems to provide some kind of solution, don't know if it's the right direction.


Basically it says:

The key steps to use the SDK compilers from a DOS prompt are:

1) Run either vcvars32.bat or vcvars64.bat as appropriate.

2) At the prompt, execute "set MSSdk=1"

3) At the prompt, execute "set DISTUTILS_USE_SDK=1"

With this the compiler succeeds, but now I arrive at the next error:

ImportError: Failed loading extension 'toc' from 'markdown.extensions.toc' or 'mdx_toc'


valentij...@gmail.com

unread,
Feb 9, 2013, 8:48:01 AM2/9/13
to rhod...@googlegroups.com
The issue with the "missing" vcvarsall.bat is a known issue: http://bugs.python.org/issue7511


valentij...@gmail.com

unread,
Feb 9, 2013, 8:50:30 AM2/9/13
to rhod...@googlegroups.com
It turned out that my virtualenv was corrupt. It was still pointing to an old python install, while I did create the env with the newer pyton.
Anay I started all over with a clean RhodeCode folder structure (and using the manual triggering of vcvars64.bat and the other 2 env variables)  and now I am getting much fursther, but still run into an error:

  File "E:\Python27\Lib\distutils\msvc9compiler.py", line 299, in query_vcvarsal
l

    raise ValueError(str(list(result.keys())))

ValueError: [u'path']

----------------------------------------
Command e:\Rhodecode\Env\Scripts\python.exe -c "import setuptools;__file__='e:\\
Rhodecode\\Env\\build\\dulwich\\setup.py';exec(compile(open(__file__).read().rep
lace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\valent~1\appda
ta\local\temp\2\pip-fhpgyw-record\install-record.txt --single-version-externally
-managed --install-headers e:\Rhodecode\Env\include\site\python2.7 failed with e
rror code 1 in e:\Rhodecode\Env\build\dulwich
Storing complete log in C:\Users\valentijn\pip\pip.log


valentij...@gmail.com

unread,
Feb 9, 2013, 9:13:04 AM2/9/13
to rhod...@googlegroups.com
Victory!

To summarize I only needed to steps to install RhodeCode to 64-bit windows (Windows Server 2008 R2 SP1):

- Install Windows 7 SDK for .NET 3.5 SP1 framework (http://www.microsoft.com/en-us/download/details.aspx?id=3138)
- Copy C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat to C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat

Can I add this to the instructions, or can someone do that? I think it would be a big help for other trying to get it running on x64 systems.

Useful links: 

Valentijn

Marcin Kuźmiński

unread,
Feb 9, 2013, 9:14:46 AM2/9/13
to rhod...@googlegroups.com
Great that you figure it out, would it be possible sending a path or pull request for installation_win.rst file ?

Cheers

Marcin Kuzminski



--
You received this message because you are subscribed to the Google Groups "rhodecode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rhodecode+...@googlegroups.com.
To post to this group, send email to rhod...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

valentij...@gmail.com

unread,
Feb 9, 2013, 12:19:59 PM2/9/13
to rhod...@googlegroups.com, mar...@python-works.com
On Saturday, February 9, 2013 3:14:46 PM UTC+1, Marcin Kuźmiński wrote:
Great that you figure it out, would it be possible sending a path or pull request for installation_win.rst file ?

Cheers

Marcin Kuzminski


Reply all
Reply to author
Forward
0 new messages