Visual Studio not installed

D

Darren Dale

Hello,

I have not been able to run "python setup.py install" on several
packages, receiving the following error:

Python was built with version 6 of Visual Studio, and extensions need to
be built with the same version of the compiler, but it isnt installed.

Could someone explain what this means? I am working on windows XP at the
moment, but when I move to Linux, does this mean I will not be able to
install from source?
 
T

Tim Peters

[Darren Dale]
I have not been able to run "python setup.py install" on several
packages, receiving the following error:

Python was built with version 6 of Visual Studio, and extensions need to
be built with the same version of the compiler, but it isnt installed.

Could someone explain what this means?

It means you're on a Windows system, you haven't installed Microsoft's
C compiler ("version 6 of Visual Studio"), and you're trying to
install a package that requires compiling C code. It doesn't work
because it needs a C compiler. Sometimes you can get a different
download of the package for Windows containing precompiled C code,
though (it depends on the specific package).
I am working on windows XP at the moment, but when I move to Linux, does
this mean I will not be able to install from source?

Linux systems all come with C compilers. Windows systems don't. Of
course on a Linux system, the Python you use will not have been
compiled with Visual Studio, so disutils won't claim that it was (it's
telling you the truth on WIndows, though). I hope that answers your
question, because I'm not sure what it was <wink>.
 
D

Darren Dale

Linux systems all come with C compilers. Windows systems don't. Of
course on a Linux system, the Python you use will not have been
compiled with Visual Studio, so disutils won't claim that it was (it's
telling you the truth on WIndows, though). I hope that answers your
question, because I'm not sure what it was <wink>.

Your right, I'm not sure what I was asking either. I forgot that linux
versions would not be compiled by Visual Studio. (I've been sick and not
sleeping). I wonder if the windows version could be compiled with a free
C-compiler?
 
N

Nick Smallbone

Darren Dale said:
Your right, I'm not sure what I was asking either. I forgot that linux
versions would not be compiled by Visual Studio. (I've been sick and not
sleeping). I wonder if the windows version could be compiled with a free
C-compiler?

Should be - MinGW or Cygwin should work. I've compiled it with Watcom before
(http://www.openwatcom.org). And you can get the compiler of Visual C++
without the IDE - http://msdn.microsoft.com/visualc/vctoolkit2003/.
 
J

Jeff Shannon

Nick said:
Should be - MinGW or Cygwin should work. I've compiled it with Watcom before
(http://www.openwatcom.org). And you can get the compiler of Visual C++
without the IDE - http://msdn.microsoft.com/visualc/vctoolkit2003/.

But keep in mind that both the interpreter and all C extensions need to
be compiled with the same compiler. Most people who write extensions
plan for them to be used with Visual Studio 6, since that's what the
python.org distribution uses. If you use some other compiler, then
you'll have to recompile every extension you install, and you may need
to tweak things to get it to work. It's probably easier, in the long
run, to download and figure out MS's free command-line version of VC++
(or to talk someone who already has it into compiling the extension in
question for you)...

Jeff Shannon
Technician/Programmer
Credit International
 
F

Fuzzyman

[snip..]
But keep in mind that both the interpreter and all C extensions need to
be compiled with the same compiler. Most people who write extensions
plan for them to be used with Visual Studio 6, since that's what the
python.org distribution uses. If you use some other compiler, then
you'll have to recompile every extension you install, and you may need

AFAIK this statement is just wrong. I've compiled extensions with gcc
(from minGW) on windows and had them work fine alongside other
precompiled extensions.

Have a look at :

http://sebsauvage.net/python/mingw.html

Regards,

Fuzzy

http://www.voidspace.org.uk/atlantibots/pythonutils.html
 
B

beliavsky

Nick Smallbone said:
Should be - MinGW or Cygwin should work. I've compiled it with Watcom before
(http://www.openwatcom.org). And you can get the compiler of Visual C++
without the IDE - http://msdn.microsoft.com/visualc/vctoolkit2003/.

I have read that the Intel C compiler (ICC) produces fast executables
(see http://gcc.gnu.org/ml/gcc/2004-05/msg00021.html for example). It
is available for both Linux and Windows -- see
http://www.intel.com/software/products/compilers/. Has anyone tried to
compile CPython using ICC and compared the performance with the
current CPython binaries?
 
P

Paul Moore

[snip..]
But keep in mind that both the interpreter and all C extensions need to
be compiled with the same compiler. Most people who write extensions
plan for them to be used with Visual Studio 6, since that's what the
python.org distribution uses. If you use some other compiler, then
you'll have to recompile every extension you install, and you may need

AFAIK this statement is just wrong. I've compiled extensions with gcc
(from minGW) on windows and had them work fine alongside other
precompiled extensions.

It's note exactly wrong, just oversimplified. The interpreter and all
extensions need to *use the same version of the C runtime*. Mingw gcc
compiles code to use the MS C runtime DLL, and so can build extensions
which will work with python.org's distribution of the interpreter. But
you still have to take care, as the CRT DLL needed changes depending
on which version of MSVC is used to build the interpreter. For python
2.3, the interpreter uses MSVCRT.DLL, which is what mingw uses by
default. For python 2.4, the interpreter uses MSVCR71.DLL, and mingw
needs to have a -lmsvcr71 flag specified to use the right DLL.

For 2.3, this is all relatively easy - you can use MSVC 6 or mingw to
build extensions which work with the python.org build of the
interpreter.

For 2.4, the picture is still changing. You can use MS Visual Studio
..NET 2003 without problems, and mingw support is nearly there. The
free MS compilers offer other possibilities, but (AFAIK) no-one has
got the details resolved with these, yet.

Hope this helps,
Paul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top