FAQ
Hi

I am building a 32-bit C++ application using Visual C++ Express 2008 on 64-bit Windows 7. The application links to Python, so I installed 32-bit Python 2.7.2 by running python-2.7.2.msi.

When I run my app, I get error:

... python27.dll is missing from your computer ...

and, indeed, it is in neither C:\Windows\System32 nor C:\Windows\SysWOW64.

Please will someone suggest what I am doing wrong?

Best regards

David

Search Discussions

  • Terry Reedy at Jun 16, 2011 at 6:14 pm

    On 6/16/2011 12:44 PM, Dennis Lee Bieber wrote:
    On Thu, 16 Jun 2011 16:26:31 +0100, David Aldrich
    <David.Aldrich at EMEA.NEC.COM> declaimed the following in
    gmane.comp.python.general:
    ... python27.dll is missing from your computer ...

    and, indeed, it is in neither C:\Windows\System32 nor C:\Windows\SysWOW64.
    Didn't M$ decree, some years ago, that application specific DLLs (in
    this situation, Python is the application) should install in the
    application path, and NOT in any system path.
    Please will someone suggest what I am doing wrong?
    I find the corresponding DLL in

    e:\Python25\libs

    (I've started putting third party applications on the e: partition as my
    C: partition was getting too tight for defrag operations)... Oh,
    ActiveState Python 2.5 install here...
    Python3.2, WinXP
    All .dll and .pyd files in Python32/DLLs
    libpython.a and .lib files in Python32/libs
    there is one .lib for each .dll and .pyd.
    Most likely you need to put the Python libs directory into your
    system PATH (not PYTHONPATH) variable.

    --
    Terry Jan Reedy
  • David Aldrich at Jun 17, 2011 at 7:13 am
    Hi

    I am building a 32-bit C++ application using Visual C++ Express 2008 on 64-bit Windows 7. The application links to Python, so I installed 32-bit Python 2.7.2 by running python-2.7.2.msi.

    When I run my app, I get error:

    ... python27.dll is missing from your computer ...

    and, indeed, it is in neither C:\Windows\System32 nor C:\Windows\SysWOW64.

    Please will someone suggest what I am doing wrong?

    Best regards

    David
  • Thomas L. Shinnick at Jun 17, 2011 at 10:23 pm

    At 02:13 AM 6/17/2011, David Aldrich wrote:
    Hi

    I am building a 32-bit C++ application using Visual C++ Express 2008
    on 64-bit Windows 7. The application links to Python, so I
    installed 32-bit Python 2.7.2 by running python-2.7.2.msi.

    When I run my app, I get error:

    ... python27.dll is missing from your computer ...

    and, indeed, it is in neither C:\Windows\System32 nor C:\Windows\SysWOW64.

    Please will someone suggest what I am doing wrong?
    Maybe nothing, maybe something, too little information to know.

    First, _look_ for the file. That is, find the file wherever it
    is. Go to the command line and do

    dir /s \ >allfiles.20110617a

    Then look at that listing. WIth Python 2.7.2 which I just installed
    the dll ends up in SysWOW64. And now I see that they are all there,
    and nowhere else!

    Directory of C:\Windows\SysWOW64
    08/24/2010 07:47 PM 2,148,864 python26.dll
    06/12/2011 03:09 PM 2,206,720 python27.dll
    03/21/2010 01:43 AM 2,137,600 python31.dll
    02/20/2011 10:29 PM 2,227,712 python32.dll

    But in December they were in both places!

    2010/11/23 21:42:42 2148864 /cygdrive/c/Windows/System32/python26.dll
    2010/11/23 21:45:32 2286080 /cygdrive/c/Windows/System32/python27.dll
    2010/11/16 20:16:31 2137600 /cygdrive/c/Windows/System32/python31.dll

    2010/11/23 21:42:42 2148864 /cygdrive/c/Windows/SysWOW64/python26.dll
    2010/11/23 21:45:32 2286080 /cygdrive/c/Windows/SysWOW64/python27.dll
    2010/11/16 20:16:31 2137600 /cygdrive/c/Windows/SysWOW64/python31.dll

    (Maybe something to do with the 32-bit vs. 64-bit installs
    mis-direction? I use only the 32-bit now...)

    Now, do another install of Python 2.7.2 on another machine. Do a
    file listing. Where do the DLLs end up? Re-do the install on your
    machine. Where do the DLLs end up?

    Do some more checking and tell us what you've _found_ and where...
  • Miki Tebeka at Jun 17, 2011 at 2:50 pm
    I don't have Windows at hand, by I *guess* that the Python DLL is somewhere near the python executable. You need to make sure the Python DLL is in PATH, either copy it next to your executable or edit the PATH environment variable.
  • Michel Claveau - MVP at Jun 21, 2011 at 6:09 am
    Hi!

    In my Win ? 64 bits, python27.dll (and others DLLs like pythoncom27.dll,
    pythoncomloader27.dll or pywintypes27.dll) are in C:\Windows\SysWOW64

    And (my) Python 2.7.2 run perfectly.

    @-salutations
    --
    Michel Claveau

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJun 16, '11 at 3:26p
activeJun 21, '11 at 6:09a
posts6
users5
websitepython.org

People

Translate

site design / logo © 2022 Grokbase