Results 1 to 2 of 2

Thread: Import python module DLL location

  1. #1
    Junior Member
    Join Date
    Jul 2015

    Import python module DLL location

    Hi all,

    Just wondering where to put python DLLs (.pyd) that are called in python modules we want to import? I've tried putting them in both .../Lianja/scriptinglanguages/python/DLLs and in .../Lianja/scriptinglanguages/python/Lib. In the "Using Python Modules" thread on here it mentions registry key editing and I've followed those instructions as well. What is happening now is:

    • I have a python DLL "mydll.pyd" in the 2 folders mentioned above
    • I have a script "" in .../Lianja/scriptinglanguages/python/Lib which has at the top:

    import mydll
    When I run
    import myscript
    in the Lianja Python console, it pops out:
    **** Lianja Python error ****
    Traceback (most recent call last):
      File "Console" at line 1, in <module>
      File "C:\lianja\scriptinglanguages\python\lib\" at line 7, in <module>
        import mydll
    ImportError: DLL load failed: The specified module could not be found.
    Has anyone had success importing python dlls? How did you do it?


  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    UK, USA, Thailand
    If the python DLL has been built against the version of Python supported in Lianja (which is 2.7 on windows) it works by just placing the DLL in the DLL directory.

    You can verify this from the Python console.

    import sqlite3

    where sqlite3.dll exists in C:\lianja\scriptinglanguages\python\DLLs

    If you exit Lianja and rename the sqllite3.dll to xxx_sqlite3.dll and then run Lianja again and do the same sequence of steps the DLL will not be found.


    The DLL must be a 32-bit DLL not a 64-bit version, and it must be compatible with Python 2.7.

    See screenshots working and then not working by renaming the sqlite3.dll file.

    Name:  Screen Shot 2016-01-07 at 3.57.22 PM.jpg
Views: 207
Size:  42.0 KB

    Name:  Screen Shot 2016-01-07 at 3.55.17 PM.jpg
Views: 206
Size:  53.1 KB
    Principal developer of Lianja, Recital and other products

    Follow me on:




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Journey into the Cloud
Join us