Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

ImportError: DLL load failed: Unable to find specific module.

Discussion in 'ML-Agents' started by mateolopezareal, Jun 12, 2020.

  1. mateolopezareal

    mateolopezareal

    Joined:
    Jun 4, 2020
    Posts:
    54
    I am trying to install ml agents in windows and after making pip install mlagents, when I try to mlagents-learn --help to check if the installation was installed well, I get this error: ImportError: DLL load failed: No se puede encontrar el módulo especificado. (Unable to find specific module.)
     
  2. celion_unity

    celion_unity

    Unity Technologies

    Joined:
    Jun 12, 2019
    Posts:
    289
  3. mateolopezareal

    mateolopezareal

    Joined:
    Jun 4, 2020
    Posts:
    54
  4. vincentgao88

    vincentgao88

    Unity Technologies

    Joined:
    Feb 7, 2018
    Posts:
    21
  5. evanmirk

    evanmirk

    Joined:
    Jan 4, 2022
    Posts:
    1
    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:

    Code (CSharp):
    1. import sys
    2. 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.

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