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


Groups > comp.lang.python > #86727 > unrolled thread

Re: Python27.dll could not be found

Started byDave Angel <davea@davea.name>
First post2015-03-02 07:26 -0500
Last post2015-03-02 07:26 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#86727 — Re: Python27.dll could not be found

FromDave Angel <davea@davea.name>
Date2015-03-02 07:26 -0500
SubjectRe: Python27.dll could not be found
Message-ID<mailman.34.1425299220.13471.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web