1

I have found here an old Question - but now version 3.10 was released. I could unzip the embeddedPython ZIP ( here ). Moreover I followed teh HOW-TO for pip install manually ( 3 ) . All the Libraries for modules (in my case I need the requests module) where also in my Directory c:\users\walter\Documents\python-3.10.0-embed-win32. But when I let run a py-script the module requests is not found. You should know that I let the Pyton run in Delphi's RAD-Studio Berlin Python4Delphi( YouTube-How_TO ). It works fine, but the pipinstalled module requests is not found. What kind of PATHS need to be defined for embedded Python? When I use the registrated Python INSTALLER, it works fine. But I what to add the embedded version into my MSI.

EDIT: Here is an other same good reference. Here Thanks

Walter Schrabmair
  • 1,251
  • 2
  • 13
  • 26

1 Answers1

1

I had to set the sys.path like this in my script, where relative to my pyscript there my site-packages.

   import sys 
   sys.path.append(os.path.join( 'C:/', 'Users', 'Walter', 'Documents','python-3.10.0-embed-amd64', 'lib', 'site-packages'))
   import requests

works fine now.

Walter Schrabmair
  • 1,251
  • 2
  • 13
  • 26