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

I am getting this error anyone can help me i have tried many times but didn’t solve

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\__main__.py", line 139, in <module>
    main()
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\__main__.py", line 121, in main
    cmdline_arguments.func(cmdline_arguments)
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\cli\scaffold.py", line 238, in run
    init_project(args, path)
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\cli\scaffold.py", line 132, in init_project
    print_train_or_instructions(args)
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\cli\scaffold.py", line 68, in print_train_or_instructions
    DEFAULT_MODELS_PATH,
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\api.py", line 103, in train
    from rasa.model_training import train
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\model_training.py", line 8, in <module>
    import rasa.engine.validation
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\engine\validation.py", line 20, in <module>
    from rasa.core.policies.policy import PolicyPrediction
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\core\policies\policy.py", line 26, in <module>
    from rasa.core.featurizers.tracker_featurizers import TrackerFeaturizer
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\core\featurizers\tracker_featurizers.py", line 12, in <module>
    from rasa.core.featurizers.single_state_featurizer import SingleStateFeaturizer
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\core\featurizers\single_state_featurizer.py", line 7, in <module>
    from rasa.nlu.extractors.extractor import EntityTagSpec
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\nlu\extractors\extractor.py", line 30, in <module>
    import rasa.utils.train_utils
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\utils\train_utils.py", line 32, in <module>
    from rasa.utils.tensorflow.data_generator import RasaBatchDataGenerator
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\utils\tensorflow\data_generator.py", line 9, in <module>
    from rasa.utils.tensorflow.model_data import RasaModelData, Data, FeatureArray
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\rasa\utils\tensorflow\model_data.py", line 6, in <module>
    from sklearn.model_selection import train_test_split
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn\__init__.py", line 82, in <module>
    from .base import clone
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn\base.py", line 17, in <module>
    from .utils import _IS_32BIT
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn\utils\__init__.py", line 23, in <module>
    from .class_weight import compute_class_weight, compute_sample_weight
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn\utils\class_weight.py", line 7, in <module>
    from .validation import _deprecate_positional_args
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn\utils\validation.py", line 26, in <module>
    from .fixes import _object_dtype_isnan, parse_version
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\sklearn\utils\fixes.py", line 20, in <module>
    import scipy.stats
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\stats\__init__.py", line 384, in <module>
    from .stats import *
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\stats\stats.py", line 179, in <module>
    from scipy.spatial.distance import cdist
  File "C:\Users\pc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\scipy\spatial\__init__.py", line 99, in <module>
    from .qhull import *
ImportError: DLL load failed: The specified module could not be found.

Welcome to the forum!

@pawan8619 can you share the traceback, how you are getting this error, and also share rasa --version?

2 Likes

rasa version is 3.0.8 Traceback (most recent call last): from .qhull import * ImportError: DLL load failed: The specified module could not be found.

@pawan8619 can you activate the environment and type rasa --version and share me the screenshot?

1 Like

i have error after rasa init command

@pawan8619 please create the anaconda-based environment and then install rasa 3.X else it will disturb your global environment, refer my this thread for generic creation anaconda and creating environment: Rasa X runs with several Errors & Warnings - #2 by nik202

Good Luck!

Okay Thanks:)

Hii, Same error int anaconda can you please solve . i also try you suggest command.

Please can you help i get the same error stating

From cryptography.hazmat.bindings._rust import( Importerror: DLL load failed while importing _rust: The specific procedure could not be found

@nik202 could you help sir

Did you created the conda environment? Did you check the rasa documentation and installation steps? What steps you have done so far let me know @kobi003

I’ma be straight with you… firstly i had the latest python installed then i got a cracked version of pycharm professional and tried to install rasa but it did not agree so i downloaded python 3.9 after that i created a venv environment not conda after that anytime i try to train my model the _rust error appears although i tried to update and change my cryptography package seems to have no effect and watched all what you recommended to others but yet nothing has happened

I did not create a conda i created the venv environment