python4delphi Python could not be properly initialized. We must quit.

要用32位的DLL,不要用64位的dll

Unable to load Python 2.7 dll with Delphi 2010 #6

 Closed
GoogleCodeExporter opened this issue on 24 Aug 2015 · 6 comments
 

Milestone

No milestone

 

Assignee

No one assigned

1 participant

python4delphi Python could not be properly initialized. We must quit.
python4delphi Python could not be properly initialized. We must quit.
What steps will reproduce the problem?
1.Using Delphi 2010 install P4D from SVN (Python_2010.dproj)
2.Drop a PythonEngine VCL into a form
3.Modify the attribute to match 2.7 python version (DLLPATH: C:\python27,
DLLNAME: python27.dll, RegVersion: 2.7 and uncheck UseLastKnownVersion )
4. Execute the application What is the expected output? I expect to see the application running with an
empty form. What do you see instead? ---------------------------
Error
---------------------------
Error 193: Could not open Dll "python27.dll"
---------------------------
OK
--------------------------- and after ... ---------------------------
Error
---------------------------
Python could not be properly initialized. We must quit.
---------------------------
OK
--------------------------- Application just quit. What version of the product are you using?
Delphi 2010 update 5 On what operating system?
Windows 7 x64

Original issue reported on code.google.com by elc...@gmail.com on 5 Sep 2010 at 6:08

Attachments:

python4delphi Python could not be properly initialized. We must quit.
Are you sure your python27.dll is in the C:\python27 directory? In all user
installations it is placed under c:\windows\system32.
In any case just leave the DLLPath blank, unless you use an unregistered
version of Python. Cannot reproduce here.

Original comment by pyscripter on 5 Sep 2010 at 7:56

  • Changed state: Invalid
python4delphi Python could not be properly initialized. We must quit.
I've copied the file from system32 to C:\python27 because it wasn't there ...
even tried with the dll in the test application folder.... empty PATH or not it
doesn't want to load any python dll. Have you tried with Windows 7 x64 ?
Clearly there's something fishy with the method of loading the dll... maybe
this has changed with the new OS.

Original comment by elc...@gmail.com on 5 Sep 2010 at 9:12

python4delphi Python could not be properly initialized. We must quit.
Btw, i will make a video to show you later today.

Original comment by elc...@gmail.com on 5 Sep 2010 at 9:13

python4delphi Python could not be properly initialized. We must quit.
Oh! Windows x64!  You need to install Python 32 bit since Delphi does not
support x64 yet.

Original comment by pyscripter on 5 Sep 2010 at 9:40

python4delphi Python could not be properly initialized. We must quit.
oh thanks i completely forgot this! I will try with python 32 bit :) thanks
again!!

Original comment by elc...@gmail.com on 5 Sep 2010 at 9:42

python4delphi Python could not be properly initialized. We must quit.
Thank you very much! It works with python 32 bit.
Also, it would be great to advise in your wiki about this issue. I know that we
can't load 64 bit dlls with 32 bit application but i was focusing instead on
your error code. The whole day i've searched on google for : Error 193: Could not open Dll "python27.dll" or Python could not be properly initialized. We must quit. It would be great to remind people that they might installed earlier before
trying P4D, that a x64 version of python and is not compatible with delphi and
p4d. Wish you eternal success with P4D
have a nice day
laurent

Original comment by elc...@gmail.com on 5 Sep 2010 at 10:20

上一篇:04-树4. Root of AVL Tree (25)


下一篇:【Android 系统开发】下载 编译 Android源代码 和 Android kernel源代码