Forum Stats

  • 3,826,337 Users
  • 2,260,628 Discussions
  • 7,896,905 Comments

Discussions

ImportError: DLL load failed: The specified module could not be found

User_6WSBG
User_6WSBG Member Posts: 17 Employee
edited Feb 18, 2020 1:00PM in Machine Learning

I am trying to explore OML4Py,  I performed steps for client installation

On trying below sample script, below is error returned.

Can you please help me to resolve issue

Script

import oml

print('Imported')

Error:        

ImportError                               Traceback (most recent call last)

<ipython-input-3-a8e833722aed> in <module>

----> 1 import oml

      2 print('Imported')

<path>\modules\oml\__init__.py in <module>

     43 import oml.algo

     44 import oml.ds

---> 45 import oml.graphics

     46 import oml.script

     47

<path>\modules\oml\graphics\__init__.py in <module>

     21 #    andiwang    05/18/18 - Creation

     22

---> 23 from .plot import boxplot

     24 from .plot import hist

     25

ImportError: DLL load failed: The specified module could not be found.

Answers

  • User_6WSBG
    User_6WSBG Member Posts: 17 Employee
    edited Feb 18, 2020 12:35PM

    Can you please suggest any pointers for above error.

  • Gianni Ceresa
    Gianni Ceresa Managing Director | Oracle ACE Director Member Posts: 6,569 Blue Diamond
    edited Feb 18, 2020 1:00PM

    It is complaining about not finding some pieces.

    How did you install it exactly?

  • User_D6HZM
    User_D6HZM Member Posts: 2 Green Ribbon
    edited Jan 11, 2022 8:24AM

    To make it short, it means that you lacked some "dependencies" for the libraries you wanted to use. This is a common problem when installing python packages, mainly in windows. Before trying to use any kind of library, first it is suggested to look up whether it needs another library in python "family". 

    The solution is to provide the python interpreter with the path-to-your-module/library. The simplest solution is to append that python path to your sys.path list. In your notebook, first try:

    import sys
    sys.path.append('my/path/to/module/folder')
    

    This isn't a permanent change in sys.path, because when you log out, your environment is reset, so any variables you may have set are lost.

    The better (and more permanent) way to solve this is to set your PYTHONPATH, which provides the interpreter with additional directories look in for python packages/modules.

    from BASH type: export PYTHONPATH=/path/to/new/folder:/another/path/...../    #each path must be separated by a colon
    


    * Embedded link removed by moderator (BluShadow)