要用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

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:

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 elc...@gmail.com on 5 Sep 2010 at 9:12

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

Original comment by elc...@gmail.com 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 elc...@gmail.com 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 elc...@gmail.com on 5 Sep 2010 at 10:20

python4delphi Python could not be properly initialized. We must quit.的更多相关文章

  1. SQL SERVER2008 DBX Error: Driver could not be properly initialized

    raised exception class TDBXError with message 'DBX Error:  Driver could not be properly initialized. ...

  2. python中video system not initialized怎么解决

    今天在github上找到一个用pygame做的Python游戏,但是clone到本地运行的时候却冒出了“mixer system not initialized”这样的问题.其实这句话说的就是音频混音 ...

  3. DBX error:Driver could not be properly initialized .... 解决办法

    系统: win7 64位+ MySql 将libmysql.dll和Dbxmys.dll 拷到 C:\Windows\SysWOW64 目录. ( 64位系统)     32位则拷到  c:\wind ...

  4. python 入门教程

    转载自:http://www.crifan.com/files/doc/docbook/python_beginner_tutorial/release/html/python_beginner_tu ...

  5. 【整理】各种Python的IDE(集成开发环境)的总结和对比

    原地址:http://www.tuicool.com/articles/rMVJNn 原文  http://www.crifan.com/summary_common_python_ide_pyscr ...

  6. python编辑器对比和推荐

    python编辑器对比和推荐   我先给一个初步的表格吧,大家如果有什么意见,或有补充,欢迎提出.有些我没有用过,先不写了.以下是我使用过的python IDE: 除了PythonWin, Visua ...

  7. 4.1. 如何在Windows环境下开发Python

    4.1. 如何在Windows环境下开发Python 4.1. 如何在Windows环境下开发Python 4.1.1. Python的最原始的开发方式是什么样的 4.1.1.1. 找个文本编辑器,新 ...

  8. 像职业选手样编码:地道Python

    Code Like a Pythonista: Idiomatic Python David Goodger goodger@python.org http://python.net/~goodger ...

  9. python之所以强大很大一部分原因在于他众多的取之不尽的库

    GUI 的 自动任务用这个pyautogui库,web 页面的用 selenium + webdriver 同类型的还有 sikuli ,低配版 按键精灵 本教程译自大神Al Sweigart的PyA ...

随机推荐

  1. “未能加载文件或程序集“EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”

    产生原因: 使用nuget管理程序包,同一个解决方案里面有不同版本的Entity Framework,有可能在不同时间安装不同版本的Entity Framework,所以出现这个问题. 解决方案: 1 ...

  2. SQL替换语句之批量修改、增加、删除字段内容

    语法 REPLACE ( original-string, search-string, replace-string ) 用法 update 表的名称 set 替换字段=REPLACE(替换字段,原 ...

  3. PHP中的日期加减方法示例

    几乎所有从事程序开发的程序员都遇到时间处理问题,PHP开发也一样,幸运的是PHP提供了很多关于日期时间函数.只要经常使用这些函数,搭配使用,日期时间处理上就熟能生巧了. 今天要讲的这个例子,需求是这样 ...

  4. JavaScript、jQuery、AJAX、JSON 解释

  5. Lucene 4.7 --实现搜索

    先看一段代码 IndexSearcher searcher = new IndexSearcher(DirectoryReader.open(FSDirectory.open(new File(&qu ...

  6. Yii2登陆添加验证码

    models中 LoginForm.php public $verifyCode; public function rules() { return [ …… ['verifyCode', 'capt ...

  7. HackerRank Ice Cream Parlor

    传送门 Ice Cream Parlor Authored by dheeraj on Mar 21 2013 Problem Statement Sunny and Johnny together ...

  8. Selenium2+python自动化13-Alert

    不是所有的弹出框都叫alert,在使用alert方法前,先要识别出它到底是不是alert.先认清楚alert长什么样子,下次碰到了,就可以用对应方法解决.alert\confirm\prompt弹出框 ...

  9. Ext.Net学习笔记24:在ASP.NET MVC中使用Ext.Net

    在前面的笔记中已经介绍了如何在ASP.NET WebForm中使用Ext.Net,由于这个系列一直在WebForm中使用,所以并没有涉及到ASP.NET MVC中的用法. 如果你要在ASP.NET M ...

  10. redis安装步骤

    7.1创建业务安装用户 安装和配置Redis软件时,需要使用redis用户登录服务器进行相关操作,因此需要创建redis的业务安装用户组和redis的业务安装用户.此操作在主备机上同时进行. 创建用户 ...