Visual Studio not installed

Discussion in 'Python' started by Darren Dale, Jul 13, 2004.

  1. Darren Dale

    Darren Dale Guest

    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?
    Darren Dale, Jul 13, 2004
    #1
    1. Advertising

  2. Darren Dale

    Tim Peters Guest

    [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>.
    Tim Peters, Jul 13, 2004
    #2
    1. Advertising

  3. Darren Dale

    Darren Dale Guest

    > 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?
    Darren Dale, Jul 13, 2004
    #3
  4. "Darren Dale" <> wrote in message
    news:cd1hci$r9o$...
    > > 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?


    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/.
    Nick Smallbone, Jul 13, 2004
    #4
  5. Darren Dale

    Jeff Shannon Guest

    Nick Smallbone wrote:

    >"Darren Dale" <> wrote...
    >
    >
    >>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/.
    >
    >


    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
    Jeff Shannon, Jul 13, 2004
    #5
  6. Darren Dale

    Fuzzyman Guest

    [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

    > 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
    Fuzzyman, Jul 14, 2004
    #6
  7. Darren Dale

    Guest

    "Nick Smallbone" <> wrote in message news:<40f44f8a$0$7799$>...

    > > 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/.


    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?
    , Jul 14, 2004
    #7
  8. Darren Dale

    Paul Moore Guest

    (Fuzzyman) writes:

    > [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.
    --
    This signature intentionally left blank
    Paul Moore, Jul 14, 2004
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wh
    Replies:
    2
    Views:
    504
    Cowboy \(Gregory A. Beamer\)
    Jan 16, 2004
  2. Thirumalai
    Replies:
    0
    Views:
    646
    Thirumalai
    May 22, 2006
  3. rockdale
    Replies:
    1
    Views:
    598
    Juan T. Llibre
    Aug 23, 2006
  4. xman
    Replies:
    0
    Views:
    479
  5. xman
    Replies:
    1
    Views:
    587
    Victor Bazarov
    Aug 17, 2005
Loading...

Share This Page