Discussion:
[Numpy-discussion] Numpy-vendor vcvarsall.bat problem.
Charles R Harris
2015-08-06 22:17:08 UTC
Permalink
Anyone know how to fix this? I've run into it before and never got it
figured out.

[192.168.121.189:22] out: File
"C:\Python34\lib\distutils\msvc9compiler.py", line 259, in query_vcvarsall
[192.168.121.189:22] out:
[192.168.121.189:22] out: raise DistutilsPlatformError("Unable to find
vcvarsall.bat")
[192.168.121.189:22] out:
[192.168.121.189:22] out: distutils.errors.DistutilsPlatformError: Unable
to find vcvarsall.bat

Chuck
David Cournapeau
2015-08-06 22:22:47 UTC
Permalink
Sorry if that's obvious, but do you have Visual Studio 2010 installed ?
Post by Charles R Harris
Anyone know how to fix this? I've run into it before and never got it
figured out.
[192.168.121.189:22] out: File
"C:\Python34\lib\distutils\msvc9compiler.py", line 259, in query_vcvarsall
[192.168.121.189:22] out: raise DistutilsPlatformError("Unable to
find vcvarsall.bat")
[192.168.121.189:22] out: distutils.errors.DistutilsPlatformError: Unable
to find vcvarsall.bat
Chuck
_______________________________________________
NumPy-Discussion mailing list
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Charles R Harris
2015-08-06 23:11:01 UTC
Permalink
Post by David Cournapeau
Sorry if that's obvious, but do you have Visual Studio 2010 installed ?
On Thu, Aug 6, 2015 at 11:17 PM, Charles R Harris <
Post by Charles R Harris
Anyone know how to fix this? I've run into it before and never got it
figured out.
[192.168.121.189:22] out: File
"C:\Python34\lib\distutils\msvc9compiler.py", line 259, in query_vcvarsall
[192.168.121.189:22] out: raise DistutilsPlatformError("Unable to
find vcvarsall.bat")
Unable to find vcvarsall.bat
Chuck
I'm running numpy-vendor, which is running wine. I think it is all mingw
with a few installed dll's. The error is coming from the Python distutils
as part of `has_cblas`.

Chuck
Charles R Harris
2015-08-06 23:19:07 UTC
Permalink
Post by Charles R Harris
Post by David Cournapeau
Sorry if that's obvious, but do you have Visual Studio 2010 installed ?
On Thu, Aug 6, 2015 at 11:17 PM, Charles R Harris <
Post by Charles R Harris
Anyone know how to fix this? I've run into it before and never got it
figured out.
[192.168.121.189:22] out: File
"C:\Python34\lib\distutils\msvc9compiler.py", line 259, in query_vcvarsall
[192.168.121.189:22] out: raise DistutilsPlatformError("Unable to
find vcvarsall.bat")
Unable to find vcvarsall.bat
Chuck
I'm running numpy-vendor, which is running wine. I think it is all mingw
with a few installed dll's. The error is coming from the Python distutils
as part of `has_cblas`.
It's not impossible that we have changed the build somewhere along the line.

Chuck
David Cournapeau
2015-08-07 09:33:21 UTC
Permalink
Which command exactly did you run to have that error ? Normally, the code
in msvc9compiler should not be called if you call the setup.py with the
mingw compiler as expected by distutils
On Thu, Aug 6, 2015 at 5:11 PM, Charles R Harris <
Post by Charles R Harris
Post by David Cournapeau
Sorry if that's obvious, but do you have Visual Studio 2010 installed ?
On Thu, Aug 6, 2015 at 11:17 PM, Charles R Harris <
Post by Charles R Harris
Anyone know how to fix this? I've run into it before and never got it
figured out.
[192.168.121.189:22] out: File
"C:\Python34\lib\distutils\msvc9compiler.py", line 259, in query_vcvarsall
[192.168.121.189:22] out: raise DistutilsPlatformError("Unable to
find vcvarsall.bat")
Unable to find vcvarsall.bat
Chuck
I'm running numpy-vendor, which is running wine. I think it is all mingw
with a few installed dll's. The error is coming from the Python distutils
as part of `has_cblas`.
It's not impossible that we have changed the build somewhere along the line.
Chuck
_______________________________________________
NumPy-Discussion mailing list
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Jaime Fernández del Río
2015-08-07 13:29:36 UTC
Permalink
Post by David Cournapeau
Which command exactly did you run to have that error ? Normally, the code
in msvc9compiler should not be called if you call the setup.py with the
mingw compiler as expected by distutils
FWIW, the incantation that works for me to compile numpy on Windows with
mingw is:

python setup.py config --compiler=mingw32 build --compiler=mingw32 install

but I am not sure I have ever tried it with Python 3.

I think my source for this was:

http://nipy.sourceforge.net/nipy/devel/devel/install/windows_scipy_build.html

Jaime
Post by David Cournapeau
On Fri, Aug 7, 2015 at 12:19 AM, Charles R Harris <
On Thu, Aug 6, 2015 at 5:11 PM, Charles R Harris <
Post by Charles R Harris
Post by David Cournapeau
Sorry if that's obvious, but do you have Visual Studio 2010 installed ?
On Thu, Aug 6, 2015 at 11:17 PM, Charles R Harris <
Post by Charles R Harris
Anyone know how to fix this? I've run into it before and never got it
figured out.
[192.168.121.189:22] out: File
"C:\Python34\lib\distutils\msvc9compiler.py", line 259, in query_vcvarsall
[192.168.121.189:22] out: raise DistutilsPlatformError("Unable to
find vcvarsall.bat")
Unable to find vcvarsall.bat
Chuck
I'm running numpy-vendor, which is running wine. I think it is all mingw
with a few installed dll's. The error is coming from the Python distutils
as part of `has_cblas`.
It's not impossible that we have changed the build somewhere along the line.
Chuck
_______________________________________________
NumPy-Discussion mailing list
http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________
NumPy-Discussion mailing list
http://mail.scipy.org/mailman/listinfo/numpy-discussion
--
(\__/)
( O.o)
( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes
de dominación mundial.
Charles R Harris
2015-08-07 14:02:53 UTC
Permalink
Post by David Cournapeau
Which command exactly did you run to have that error ? Normally, the code
in msvc9compiler should not be called if you call the setup.py with the
mingw compiler as expected by distutils
I'm running numpy-vendor which is running wine inside ubuntu inside a vm.
The relevant commands are

run("rm -rf ../local")
run("paver sdist")
run("python setup.py install --prefix ../local")
run("paver pdf")
run("paver bdist_superpack -p 3.4")
run("paver bdist_superpack -p 3.3")
run("paver bdist_superpack -p 2.7")
run("paver write_release_and_log")
run("paver bdist_wininst_simple -p 2.7")
run("paver bdist_wininst_simple -p 3.3")
run("paver bdist_wininst_simple -p 3.4")

Which don't look suspicious. I think we may have changed something in
numpy/distutils, possibly as part of
https://github.com/numpy/numpy/pull/6152

Chuck
Charles R Harris
2015-08-07 14:16:06 UTC
Permalink
Post by Charles R Harris
Post by David Cournapeau
Which command exactly did you run to have that error ? Normally, the code
in msvc9compiler should not be called if you call the setup.py with the
mingw compiler as expected by distutils
I'm running numpy-vendor which is running wine inside ubuntu inside a vm.
The relevant commands are
run("rm -rf ../local")
run("paver sdist")
run("python setup.py install --prefix ../local")
run("paver pdf")
run("paver bdist_superpack -p 3.4")
run("paver bdist_superpack -p 3.3")
run("paver bdist_superpack -p 2.7")
run("paver write_release_and_log")
run("paver bdist_wininst_simple -p 2.7")
run("paver bdist_wininst_simple -p 3.3")
run("paver bdist_wininst_simple -p 3.4")
Which don't look suspicious. I think we may have changed something in
numpy/distutils, possibly as part of
https://github.com/numpy/numpy/pull/6152
Actually, looks like b6d0263239926e8b14ebc26a0d7b9469fa7866d4. Hmm...,
strange.

Chuck
Charles R Harris
2015-08-07 15:15:58 UTC
Permalink
On Fri, Aug 7, 2015 at 8:02 AM, Charles R Harris <
Post by Charles R Harris
Post by David Cournapeau
Which command exactly did you run to have that error ? Normally, the
code in msvc9compiler should not be called if you call the setup.py with
the mingw compiler as expected by distutils
I'm running numpy-vendor which is running wine inside ubuntu inside a vm.
The relevant commands are
run("rm -rf ../local")
run("paver sdist")
run("python setup.py install --prefix ../local")
run("paver pdf")
run("paver bdist_superpack -p 3.4")
run("paver bdist_superpack -p 3.3")
run("paver bdist_superpack -p 2.7")
run("paver write_release_and_log")
run("paver bdist_wininst_simple -p 2.7")
run("paver bdist_wininst_simple -p 3.3")
run("paver bdist_wininst_simple -p 3.4")
Which don't look suspicious. I think we may have changed something in
numpy/distutils, possibly as part of
https://github.com/numpy/numpy/pull/6152
Actually, looks like b6d0263239926e8b14ebc26a0d7b9469fa7866d4. Hmm...,
strange.
OK, that just leads to an earlier cythonize error because random.pyx
changed, so not the root cause.

Chuck
Charles R Harris
2015-08-07 15:36:38 UTC
Permalink
So the problem comes from the has_cblas function

def has_cblas(self):
# primitive cblas check by looking for the header
res = False
c = distutils.ccompiler.new_compiler()
tmpdir = tempfile.mkdtemp()
s = """#include <cblas.h>"""
src = os.path.join(tmpdir, 'source.c')
try:
with open(src, 'wt') as f:
f.write(s)
try:
c.compile([src], output_dir=tmpdir,
include_dirs=self.get_include_dirs())
res = True
except distutils.ccompiler.CompileError:
res = False
finally:
shutil.rmtree(tmpdir)
return res

The problem is the test compile, which does not use the mingw compiler, but
falls back to the compiler found in python distutils. Not sure what the fix
is.

Chuck
Charles R Harris
2015-08-07 16:17:27 UTC
Permalink
Post by Charles R Harris
So the problem comes from the has_cblas function
# primitive cblas check by looking for the header
res = False
c = distutils.ccompiler.new_compiler()
tmpdir = tempfile.mkdtemp()
s = """#include <cblas.h>"""
src = os.path.join(tmpdir, 'source.c')
f.write(s)
c.compile([src], output_dir=tmpdir,
include_dirs=self.get_include_dirs())
res = True
res = False
shutil.rmtree(tmpdir)
return res
The problem is the test compile, which does not use the mingw compiler,
but falls back to the compiler found in python distutils. Not sure what the
fix is.
See #6175 <https://github.com/numpy/numpy/pull/6175> .

Chuck

Loading...