-1

I'm working on a project with Python4Delphi component and also i want to use embedded version of python which is better to use as needs no installation. I've set the correct path and filename to python310.dll in the appropriate properties but no chance to run properly and always getting the

Error 87: Could not open Dll "python33.dll"

Python could not be properly initialized. We must quit.

i also added the directory of the dll to environment variables still no luck. whats wrong? (python and delphi 10.4 project both are 32bit versions, windows 10 64bit)

7
  • You write about using "python310.dll", but the error message is about a "python33.dll"!? Commented Oct 14, 2021 at 18:53
  • exactly! don't know wtf! Commented Oct 14, 2021 at 22:07
  • So then why do you think you need to provide a Python 3.10 DLL? Did you try to provide a Python 3.3 DLL? Commented Oct 15, 2021 at 6:52
  • Coz i have 3.10 installed no need for 3.3 and thats weird Commented Nov 6, 2021 at 21:45
  • But the Delphi component seems to need 3.3! Commented Nov 7, 2021 at 1:45

3 Answers 3

1

just set the propery "UseLastKnownVersion" of PythonEngine Component to false, the "python33.dll not found " will disapper

Sign up to request clarification or add additional context in comments.

Comments

0

I had the same issue. Reinstall python worked for me. But this time i maked sure that was installing the same architecture that i was compiling the code to. I reinstall python 3.10 on 32bits and worked for me, cuz i was compiling on win32

2 Comments

This wasn't my case but this surely helps someone, Thanks mate.
That fixed it for me too. I had installed Python 64 bit, but was compiling my Delphi app EXE as 32 bit
-1

There is an error in pythonengine.pas. on line 9075 change

MinorVersion := PythonVersion[3];

to

MinorVersion := StrToInt(copy(PythonVersion, 3, length(PythonVersion) - 2));

the MinorVersion is incorrectly set to 1 for version 3.10.

1 Comment

This does not appear to be the case in May 2022 (Python 3.10, and P4D from the current code base)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.