Compiling Python using Microsoft Visual C++ 2008

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Colin J. Williams

    Compiling Python using Microsoft Visual C++ 2008


    1.I have both 2.5 and 2.6 but both
    appear, under Recent Projects, as
    pcbuild. It would be helpful if the
    Python Version could be indicated.
    2.With 2.6, Python compiles and executes
    OK but various packages are not
    compiled, eg sqlite3.
    3.Pythonw compiles OK but not sqlite3.
    4.Mike Fletcher suggests an approach
    (http://www.vrplumber.com/programming/mstoolkit/)
    with Visual C for Python 2.4. Is this
    still the recommended way to compile
    Python 2.6?
    5.Python 2.5 source refers to an Older
    Visual C. Automatic conversion to
    Visual C 2008 gives the message “Some of
    the properties associated with the
    solution could not be read.” All
    projects except one had a single
    warning, there were no errors reported.
    6.After conversion there is no python
    project, it is flagged “unavailable”.
    7.Pythoncore builds with no errors and 6
    warnings but there is no executable.
    8.Python 2.5 build _tkinter fails –
    tcl.h not found.

    I would welcom advice on how to proceed.

    Colin W.
  • =?windows-1252?Q?=22Martin_v=2E_L=F6wis=22?=

    #2
    Re: Compiling Python using Microsoft Visual C++ 2008

    1.I have both 2.5 and 2.6 but both appear, under Recent Projects, as
    pcbuild. It would be helpful if the Python Version could be indicated.
    Hover over the link, and it will display the full path, which you can
    then infer to reason about the specific copy of Python you are using.

    In any case, compiling Python 2.5 with VS 2008 is not supported.
    2.With 2.6, Python compiles and executes OK but various packages are not
    compiled, eg sqlite3.
    See PCbuild/readme.txt.
    3.Pythonw compiles OK but not sqlite3.
    So what's the error?
    4.Mike Fletcher suggests an approach
    (http://www.vrplumber.com/programming/mstoolkit/) with Visual C for
    Python 2.4. Is this still the recommended way to compile Python 2.6?
    No. Either use the full product, or the express edition. Neither
    requires and additional setup.
    5.Python 2.5 source refers to an Older Visual C. Automatic conversion
    to Visual C 2008 gives the message “Some of the properties associated
    with the solution could not be read.” All projects except one had a
    single warning, there were no errors reported.
    6.After conversion there is no python project, it is flagged “unavailable”.
    See above. This procedure is not supported; you are on your own.
    Get a copy of VS 2003 if you want to follow the official
    recommendations .
    7.Pythoncore builds with no errors and 6 warnings but there is no
    executable.
    8.Python 2.5 build _tkinter fails – tcl.h not found.
    See PCbuild/readme.txt.

    Regards,
    Martin

    Comment

    • Colin J. Williams

      #3
      Re: Compiling Python using Microsoft Visual C++ 2008

      Martin v. Löwis wrote:
      >1.I have both 2.5 and 2.6 but both appear, under Recent Projects, as
      >pcbuild. It would be helpful if the Python Version could be indicated.
      >
      Hover over the link, and it will display the full path, which you can
      then infer to reason about the specific copy of Python you are using.
      Lovely, thanks. It's at the bottom of
      the screen.
      >
      In any case, compiling Python 2.5 with VS 2008 is not supported.
      >
      >2.With 2.6, Python compiles and executes OK but various packages are not
      >compiled, eg sqlite3.
      >
      See PCbuild/readme.txt.
      I presume that this is PCbuild8.txt
      >
      >3.Pythonw compiles OK but not sqlite3.
      >
      So what's the error?
      >
      >4.Mike Fletcher suggests an approach
      >(http://www.vrplumber.com/programming/mstoolkit/) with Visual C for
      >Python 2.4. Is this still the recommended way to compile Python 2.6?
      >
      No. Either use the full product, or the express edition. Neither
      requires and additional setup.
      >
      >5.Python 2.5 source refers to an Older Visual C. Automatic conversion
      >to Visual C 2008 gives the message “Some of the properties associated
      >with the solution could not be read.” All projects except one had a
      >single warning, there were no errors reported.
      >6.After conversion there is no python project, it is flagged “unavailable”.
      >
      See above. This procedure is not supported; you are on your own.
      Get a copy of VS 2003 if you want to follow the official
      recommendations .
      >
      >7.Pythoncore builds with no errors and 6 warnings but there is no
      >executable.
      >8.Python 2.5 build _tkinter fails – tcl.h not found.
      >
      See PCbuild/readme.txt.
      >
      Regards,
      Martin
      Thanks. I'll look at the readme more
      carefully and seek VS 2003.

      Now, I would like to remove Python 2.5
      from VS 2008 but see no obvious way of
      getting rid of it.

      Colin W.

      Comment

      • Christian Heimes

        #4
        Re: Compiling Python using Microsoft Visual C++ 2008

        Colin J. Williams schrieb:
        >See PCbuild/readme.txt.
        >
        I presume that this is PCbuild8.txt
        No, it's PCbuild/readme.txt in Python 2.6 and 3.0

        By the way you can call Tools\buildbot\ external.bat from the root
        directory of the 2.6 and 3.0. It checks out and build the dependencies.
        The script requires the VS 9.0 tools and the svn command line executables.

        Christian

        Comment

        • =?windows-1252?Q?=22Martin_v=2E_L=F6wis=22?=

          #5
          Re: Compiling Python using Microsoft Visual C++ 2008

          >See PCbuild/readme.txt.
          >
          I presume that this is PCbuild8.txt
          As Christian says: PCbuild/readme.txt are the correct instructions
          (and had been since Python 2.0 or so).
          Now, I would like to remove Python 2.5 from VS 2008 but see no obvious
          way of getting rid of it.
          You might be able to clear the most-recent-projects list in the registry
          somehow, but I personally wouldn't worry - if you open other projects,
          this one will scroll off the list eventually.

          Regards,
          Martin

          Comment

          Working...