question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

when I try to download models or Validate or use info --markdown I get this error.

Traceback (most recent call last):
  File "C:\Users\MSI\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "C:\Users\MSI\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 147, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "C:\Users\MSI\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "C:\Users\MSI\Desktop\py\nlps\lib\site-packages\spacy\__init__.py", line 12, in <module>
    from . import pipeline
  File "C:\Users\MSI\Desktop\py\nlps\lib\site-packages\spacy\pipeline\__init__.py", line 4, in <module>
    from .pipes import Tagger, DependencyParser, EntityRecognizer, EntityLinker
  File "pipes.pyx", line 1, in init spacy.pipeline.pipes
ImportError: DLL load failed while importing nn_parser: The specified module could not be found.`

I’ve tried it with python 3.8.6 64-bit, 3.9.0 64-bit and with virtual env. I get the same error.

Here is my pip list for vitual env.

blis       0.7.4
catalogue  1.0.0
certifi    2020.12.5
chardet    4.0.0
cymem      2.0.5
idna       2.10
murmurhash 1.0.5
numpy      1.19.5
pip        20.3.3
plac       1.1.3
preshed    3.0.5
requests   2.25.1
setuptools 49.2.1
spacy      2.3.5
srsly      1.0.5
thinc      7.4.5
tqdm       4.55.1
urllib3    1.26.2
wasabi     0.8.0

The message I get when I install spacy

(nlps) C:\Users\MSI\Desktop\py>pip install spacy
Collecting spacy
  Using cached spacy-2.3.5-cp39-cp39-win_amd64.whl (9.4 MB)
Requirement already satisfied: setuptools in c:\users\msi\desktop\py\nlps\lib\site-packages (from spacy) (49.2.1)
Collecting blis<0.8.0,>=0.4.0
  Using cached blis-0.7.4-cp39-cp39-win_amd64.whl (6.5 MB)
Collecting catalogue<1.1.0,>=0.0.7
  Using cached catalogue-1.0.0-py2.py3-none-any.whl (7.7 kB)
Collecting cymem<2.1.0,>=2.0.2
  Using cached cymem-2.0.5-cp39-cp39-win_amd64.whl (36 kB)
Collecting murmurhash<1.1.0,>=0.28.0
  Using cached murmurhash-1.0.5-cp39-cp39-win_amd64.whl (21 kB)
Collecting numpy>=1.15.0
  Using cached numpy-1.19.5-cp39-cp39-win_amd64.whl (13.3 MB)
Collecting plac<1.2.0,>=0.9.6
  Using cached plac-1.1.3-py2.py3-none-any.whl (20 kB)
Collecting preshed<3.1.0,>=3.0.2
  Using cached preshed-3.0.5-cp39-cp39-win_amd64.whl (112 kB)
Collecting requests<3.0.0,>=2.13.0
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting chardet<5,>=3.0.2
  Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting idna<3,>=2.5
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting srsly<1.1.0,>=1.0.2
  Using cached srsly-1.0.5-cp39-cp39-win_amd64.whl (177 kB)
Collecting thinc<7.5.0,>=7.4.1
  Using cached thinc-7.4.5-cp39-cp39-win_amd64.whl (904 kB)
Collecting tqdm<5.0.0,>=4.38.0
  Downloading tqdm-4.55.1-py2.py3-none-any.whl (68 kB)
     |████████████████████████████████| 68 kB 138 kB/s
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.2-py2.py3-none-any.whl (136 kB)
Collecting wasabi<1.1.0,>=0.4.0
  Using cached wasabi-0.8.0-py3-none-any.whl (23 kB)
Installing collected packages: numpy, murmurhash, cymem, wasabi, urllib3, tqdm, srsly, preshed, plac, idna, chardet, certifi, catalogue, blis, thinc, requests, spacy
Successfully installed blis-0.7.4 catalogue-1.0.0 certifi-2020.12.5 chardet-4.0.0 cymem-2.0.5 idna-2.10 murmurhash-1.0.5 numpy-1.19.5 plac-1.1.3 preshed-3.0.5 requests-2.25.1 spacy-2.3.5 srsly-1.0.5 thinc-7.4.5 tqdm-4.55.1 urllib3-1.26.2 wasabi-0.8.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
svlandegcommented, Jan 8, 2021

I’m grasping at straws here, but what if you downgrade pip to something like 20.2.4 (and restart in a fresh env etc…) ?

[NOTE: I removed a duplicate comment of yours]

1reaction
thisisSisamcommented, Jan 8, 2021

Thank you. I tried what you told but got the same error.

(nlps00) C:\Users\MSI\Desktop\py>python -m spacy de_core_news_sm
Traceback (most recent call last):
  File "C:\Users\MSI\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "C:\Users\MSI\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 144, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "C:\Users\MSI\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "C:\Users\MSI\Desktop\py\nlps00\lib\site-packages\spacy\__init__.py", line 12, in <module>
    from . import pipeline
  File "C:\Users\MSI\Desktop\py\nlps00\lib\site-packages\spacy\pipeline\__init__.py", line 4, in <module>
    from .pipes import Tagger, DependencyParser, EntityRecognizer, EntityLinker
  File "pipes.pyx", line 1, in init spacy.pipeline.pipes
ImportError: DLL load failed while importing nn_parser: The specified module could not be found.

I did get a error on pip install -U pip setuptools wheel but that got resolved (I think). here’s the log

(nlps00) C:\Users\MSI\Desktop\py>py --version
Python 3.8.6

(nlps00) C:\Users\MSI\Desktop\py>pip install -U pip setuptools wheel
Collecting pip
  Using cached pip-20.3.3-py2.py3-none-any.whl (1.5 MB)
Collecting setuptools
  Using cached setuptools-51.1.1-py3-none-any.whl (2.0 MB)
Collecting wheel
  Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: pip, setuptools, wheel
  Attempting uninstall: pip
    Found existing installation: pip 20.2.1
    Uninstalling pip-20.2.1:
      Successfully uninstalled pip-20.2.1
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\\Users\\MSI\\AppData\\Local\\Temp\\pip-uninstall-g8kh44ae\\pip.exe'
Consider using the `--user` option or check the permissions.

(nlps00) C:\Users\MSI\Desktop\py>pip install -U --user pip setuptools wheel
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.

(nlps00) C:\Users\MSI\Desktop\py>pip install -U pip setuptools wheel
Requirement already satisfied: pip in c:\users\msi\desktop\py\nlps00\lib\site-packages (20.3.3)
Requirement already satisfied: setuptools in c:\users\msi\desktop\py\nlps00\lib\site-packages (49.2.1)
Collecting wheel
  Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Collecting setuptools
  Using cached setuptools-51.1.1-py3-none-any.whl (2.0 MB)
Installing collected packages: wheel, setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 49.2.1
    Uninstalling setuptools-49.2.1:
      Successfully uninstalled setuptools-49.2.1
Successfully installed setuptools-51.1.1 wheel-0.36.2
Read more comments on GitHub >

github_iconTop Results From Across the Web

DLL load failed: The specified module could not be found ...
It was giving this error: ImportError: DLL load failed: The specified module could not be found. Opened a Visual Studio x64 command prompt....
Read more >
How to Fix Python ImportError: Dll Load Failed Error
This post offers 2 ways to fix the error "ImportError: Dll Load Failed: The specified module could not be found."
Read more >
scipy - ImportError: DLL load failed: The specified module ...
Trying to figure out what's going wrong here. Tried to update all by conda update --all and also using the conda package manager...
Read more >
Importerror: Dll Load Failed: The Specified Module ... - ADocLib
An absolute import specifies the resource to be imported using its full path from the project's root folder. Syntax and Practical Examples.
Read more >
[SOLVED] How to solve ImportError:DLL load failed - YouTube
This is the problem that occurs while opening the jupyter notebook using the ... load failed : The specified module could not be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found