Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #86727

Re: Python27.dll could not be found

Date 2015-03-02 07:26 -0500
From Dave Angel <davea@davea.name>
Subject Re: Python27.dll could not be found
References <CA+QVAb4eiimGOqXGWy-f2PiwBriV=Qjs9O7wSZHFuayHpH=FSQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.34.1425299220.13471.python-list@python.org> (permalink)

Show all headers | View raw


On 03/02/2015 01:00 AM, Sarvagya Pant wrote:
> I have been writing a c++ program that is supposed to call the python
> function. The code is a snippet from python.org itself.
> #include <Python.h>
> #include <iostream>
> #include <string>
>
> int main()
> {
>      Py_SetProgramName("Learning");
>      Py_Initialize();
>      PyRun_SimpleString("import hashlib\nprint hashlib.md5('sarvagya
> pant').hexdigest()");
>      Py_Finalize();
>      return 0;
> }
>
Please be more explicit about what you know and what you guess.


> I have used Visual Studio 2010. I have linked the include directories and
> lib files correctly. It gets correctly built.

Do you just mean that there are no errors displayed during the build?

> Dependency walkerPlease be more explicit about what you know and what you guess.
  shows the
> file depends upon Python27.dll.
> I have looked into the folder Dlls of python. It is not there.

What is not there?  Your executable, or Python27.dll ?  And exactly what 
folder(s) are you looking?

> Also I have
> checked both System and System32 folder. It is not present in there too.
> Python version is 2.7. How can I get Python27.dll to deploy my app for
> customers? Please help.
>

Python27.dll does not deploy your app.  Your app loads Python27.dll.

You can search for a file in Windows by doing something like:

      dir /s c:\somefile.dll

at a cmd prompt.  Does that find whatever file you're seeking?

When I ran Windows, I had written a simple utility that searched the 
PATH for a specified file.  I called it which.bat  to match the Linux 
equivalent.


I don't run Windows very often, but on my wife's machine I see 
python27.dll in

     c:\windows\syswow64

That's on a Windows7 machine running 64bit version.  Location will be 
different on various versions of Windows.

You can look to see where the system thinks the Python executable is 
located by doing

     ftype .py
and seeing what it shows.  Mine shows Python.File

   Then do
     assoc  Python.File

to see an actual path.


-- 
DaveA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Python27.dll could not be found Dave Angel <davea@davea.name> - 2015-03-02 07:26 -0500

csiph-web