zoukankan      html  css  js  c++  java
  • 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

    1 participant

    @GoogleCodeExporter
    @GoogleCodeExporter
    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:

    @GoogleCodeExporter
    Are you sure your python27.dll is in the C:python27 directory? In all user 
    installations it is placed under c:windowssystem32.
    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
    @GoogleCodeExporter
    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

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

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

    @GoogleCodeExporter
    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

    @GoogleCodeExporter
    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

    @GoogleCodeExporter
    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

  • 相关阅读:
    使用netty实现im聊天
    使用rabbitmq实现集群im聊天服务器消息的路由
    springcloud feign使用
    10万用户一年365天的登录情况如何用redis存储,并快速检索任意时间窗内的活跃用户
    redis的rdb与aof持久化机制
    springcloud-zinpin的安装与使用
    kafka的基本安装与使用
    RabbitMq 实现延时队列-Springboot版本
    RabbitMq 基本命令
    Dcoker 安装 rabbitMq
  • 原文地址:https://www.cnblogs.com/h2zZhou/p/5106639.html
Copyright © 2011-2022 走看看