Python Forum
Adding libraries to embedded Python as a ZIP
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding libraries to embedded Python as a ZIP
#1
Python 3.8.10 for Windows x64

We have been using the base embedded Python 3.8 with success. We now need to add some additional libraries to the installation to allow for some more advanced capabilities. Several of the libraries have a substantial number of files, so we we would like to package them similarly to the way that the base embedded Python is installed, using a ZIP file.

Some of the libraries make use of PYD files (DLLs). We are aware of the fact that Windows cannot load a PYD file from a ZIP file. The base embedded install includes the PYD files outside of the ZIP file that uses them, in the same directory that contains the Python.dll file itself.

We would like to use that same method for the additional libraries, however all attempts to make that work have failed. It appears that the PYD loading system does not use the any of the PATH systems that Python normally uses for finding files. We have not found how we can modify the installed package to load the PYD file from anywhere but the same location as the Python file that loads it.

Does anyone know of a method that we can use to allow for the library to search for, or hard code a different path for the required PYDs? How is the embedded system built so that it can load the required PYD files from the same place as the ZIP file?

Thanks!




My problem ce
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to run detectron2, as python embedded code in C++, on GPU? hassaniqbal931 3 1,111 Nov-02-2023, 04:45 PM
Last Post: blabling2
Bug Embedded Python Memory Leaks Alexei 1 1,035 Sep-16-2022, 01:15 PM
Last Post: Alexei
  Embedded Python in C++ Xeno 19 3,574 Aug-03-2022, 07:29 AM
Last Post: Gribouillis
  Python script with local libraries zazas321 0 978 Jul-05-2022, 04:55 AM
Last Post: zazas321
  Embedded python fails to compile on Raspberry Pi tryfon 2 3,489 Dec-22-2020, 02:06 PM
Last Post: tryfon
  Can Embedded Python run any shared library on Android ? sprotz 0 2,333 Nov-08-2020, 12:21 PM
Last Post: sprotz
  memory leak on embedded python in c++ asdf3721 3 3,401 Jul-16-2020, 06:33 AM
Last Post: Gribouillis
  Embedded Python PyObject_CallObject function JRHeisey 1 2,396 Nov-27-2019, 01:50 AM
Last Post: casevh
  Adding markers to Folium map only adding last element. tantony 0 2,129 Oct-16-2019, 03:28 PM
Last Post: tantony
  Installing Python and pointing it to required libraries hooiberg 2 4,321 May-13-2019, 05:55 PM
Last Post: ebolisa

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020