要用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. jquery封装常用方法

    var git = { //true表示格式正确 checkEmail: function (str) { -]{,})(\S*)/g) == null) { return false; } else ...

  2. SpringMVC使用中遇到的问题总结

    使用的IDE工具是MyEclipse2014, spring版本为3.1.1 在使用Spring MVC时需要修改web.xml配置文件,web.xml默认放在WEB-INF目录下. 1.web.xm ...

  3. HDU 3401 Trade dp+单调队列优化

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3401 Trade Time Limit: 2000/1000 MS (Java/Others)Mem ...

  4. Java设计模式-备忘录模式(Memento)

    主要目的是保存一个对象的某个状态,以便在适当的时候恢复对象,个人觉得叫备份模式更形象些,通俗的讲下:假设有原始类A,A中有各种属性,A可以决定需要备份的属性,备忘录类B是用来存储A的一些内部状态,类C ...

  5. 【ZOJ 3870】 Team Formation

    题意 n个数,找出有几对a.b 符合 a ^ b > max(a,b) .^表示异或号 分析 对于数a,如果它的二进制是: 1 0 1  0 0 1,那么和它 ^ 后 能比他大的数就是: 0 1 ...

  6. Android中的Uri.parse()

    1,调web浏览器 Uri myBlogUri = Uri.parse("http://www.baidu.com"); returnIt = new Intent(Intent. ...

  7. 洛谷P1082 同余方程

    题目描述 求关于 x 的同余方程 ax ≡ 1 (mod b)的最小正整数解. 输入输出格式 输入格式: 输入只有一行,包含两个正整数 a, b,用一个空格隔开. 输出格式: 输出只有一行,包含一个正 ...

  8. Rebar:Erlang构建工具

    Rebar是一款Erlang的构建工具,使用它可以方便的编译.测试erlang程序.内联驱动和打包Erlang发行版本. Rebar是一个独立的erlang脚本,所以使用Rebar发布程序非常简单,甚 ...

  9. if,switch,do,while,for实例

    1.#include <stdio.h>void f1(int i){    if( i < 6 )    {        printf("Failed!\n" ...

  10. 创建泛类集合List以及数组转集合,集合转数组的应用

    List<int> list = new List<int>(); list.Add(); list.Add(); list.Add(); list.AddRange(, , ...