• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

python4delphiPythoncouldnotbeproperlyinitialized.Wemustquit.

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

Unable to load Python 2.7 dll with Delphi 2010 #6

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

1 participant

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 [email protected] on 5 Sep 2010 at 6:08

Attachments:

on 24 Aug 2015
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
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 [email protected] on 5 Sep 2010 at 9:12

Btw, i will make a video to show you later today.

Original comment by [email protected] on 5 Sep 2010 at 9:13

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

oh thanks i completely forgot this! I will try with python 32 bit :) thanks 
again!!

Original comment by [email protected] on 5 Sep 2010 at 9:42

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 [email protected] on 5 Sep 2010 at 10:20

on 24 Aug 2015

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
delphi:TStream类整理发布时间:2022-07-18
下一篇:
Delphi三层server下数据连接缓冲池发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap