要用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. redis学习笔记——(4)

    一.概述: 在该系列的前几篇博客中,主要讲述的是与Redis数据类型相关的命令,如String.List.Set.Hashes和Sorted-Set.这些命令都具有一个共同点,即所有的操作都是针对与K ...

  2. 利用 NSSortDescriptor 对 NSMutableArray 排序

    有时我们在NSMutableArray中存的是网络请求返回的数据,而每一个元素又是一个NSDictionary,如果这时候需要把数组中的元素按照每个元素字典中某一个key来排序,那么我们可以利用Obj ...

  3. Oracle中新增表代码

    create table userinfo ( id varchar2(36) primary key, username varchar2(50) not null, password varcha ...

  4. C/C++语言算法题——替换

    [问题] Description 给定一个有限长度的非负整数序列.一次操作是指从第一个元素开始,依次把数列中的每个数替换为它右边比它小的数的个数.对该数列不断进行这个操作.总有一个时刻该数列将不再发生 ...

  5. LCA最近公共祖先 Tarjan离线算法

    学习博客:  http://noalgo.info/476.html 讲的很清楚! 对于一颗树,dfs遍历时,先向下遍历,并且用并查集维护当前节点和父节点的集合.这样如果关于当前节点(A)的关联节点( ...

  6. 【CodeForces 614A】Link/Cut Tree

    题 题意 给你一个区间,求里面有多少个数是k的次方. 分析 暴力,但是要注意这题范围会爆long long,当k=1e8: l=1:r=1e18时 k²=1e16,判断了是≤r,然后输出,再乘k就是1 ...

  7. Bzoj3943 [Usaco2015 Feb]SuperBull

    3943: [Usaco2015 Feb]SuperBull Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 300  Solved: 185 Desc ...

  8. Java输入、输入、IO流 类层次关系梳理

    本文主要关注在Java编程中涉及到的IO相关的类库.方法.以及对各个层次(抽线.接口继承)的流之间的关系进行梳理 相关学习资料 http://baike.baidu.com/view/1007958. ...

  9. POJ 1470 Closest Common Ancestors

    传送门 Closest Common Ancestors Time Limit: 2000MS   Memory Limit: 10000K Total Submissions: 17306   Ac ...

  10. HD1580(尼姆博弈入门)

    启蒙博客:http://www.cnblogs.com/jiangjun/archive/2012/11/01/2749937.html 尼姆博奕(Nimm Game):有三堆各若干个物品,两个人轮流 ...