Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLL load failed: The specified module could not be found #13006

Closed
achukumar001 opened this issue Feb 21, 2019 · 9 comments
Closed

DLL load failed: The specified module could not be found #13006

achukumar001 opened this issue Feb 21, 2019 · 9 comments

Comments

@achukumar001
Copy link

achukumar001 commented Feb 21, 2019

When am trying to run the tensorboard in anaconda prompt, I am getting below error. Can somebody help me to recover from it?

Reproducing code example:

tensorboard --logdir=logs/

Error message:

Traceback (most recent call last):
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy\core_init_.py", line 16, in
from . import multiarray
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy\core\multiarray.py", line 12, in
from . import overrides
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy\core\overrides.py", line 6, in
from numpy.core._multiarray_umath import (
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\aswk\AppData\Local\Continuum\anaconda3\Scripts\tensorboard.exe_main
.py", line 5, in
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\tensorboard\main.py", line 45, in
from tensorboard import default
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\tensorboard\default.py", line 34, in
import tensorflow as tf
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\tensorflow_init
.py", line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\tensorflow\python_init_.py", line 47, in
import numpy as np
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy_init_.py", line 142, in
from . import core
File "c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy\core_init_.py", line 47, in
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
Here is how to proceed:

  • If you're working with a numpy git repository, try git clean -xdf
    (removes all files not under version control) and rebuild numpy.
  • If you are simply trying to use the numpy version that you have installed:
    your installation is broken - please reinstall numpy.
  • If you have already reinstalled and that did not fix the problem, then:
    1. Check that you are using the Python you expect (you're using c:\users\aswk\appdata\local\continuum\anaconda3\python.exe),
      and that you have no directories in your PATH or PYTHONPATH that can
      interfere with the Python and numpy versions you're trying to use.

    2. If (1) looks fine, you can open a new issue at
      https://github.com/numpy/numpy/issues. Please include details on:

      • how you installed Python
      • how you installed numpy
      • your operating system
      • whether or not you have multiple versions of Python installed
      • if you built from source, your compiler versions and ideally a build log

      Note: this error has many possible causes, so please don't comment on
      an existing issue about this - open a new one instead.

Original error was: DLL load failed: The specified module could not be found.

Numpy/Python version information:

(base) C:\Users\aswk.spyder-py3\python example files\Test_project>conda list numpy
packages in environment at C:\Users\aswk\AppData\Local\Continuum\anaconda3:

Name Version Build Channel
msgpack-numpy 0.4.3.2 pypi_0 pypi
numpy 1.16.1 pypi_0 pypi
numpydoc 0.8.0 py36_0

@mattip
Copy link
Member

mattip commented Feb 21, 2019

Duplicate of #12957. If you are running a brand-new Anaconda, they broke updating numpy using pip. You need to manually modify your PATH before running python.

rem This fails
python -c "import numpy"

rem Does this succeed ??? 
PATH=path\to\site-packages\numpy\.libs;%PATH%
python -c "import numpy"

In your case path\to\site-packages\numpy\.libs is c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy\.lib

@achukumar001
Copy link
Author

Duplicate of #12957. If you are running a brand-new Anaconda, they broke updating numpy using pip. You need to manually modify your PATH before running python.

rem This fails
python -c "import numpy"

rem Does this succeed ??? 
PATH=path\to\site-packages\numpy\.libs;%PATH%
python -c "import numpy"

In your case path\to\site-packages\numpy\.libs is c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy\.lib

But I don't have a directory like this.
c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy\.lib

I have this directory
c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy\lib

I added this path but still came the same error.

@mattip
Copy link
Member

mattip commented Feb 21, 2019

Strange. The line numpy 1.16.1 pypi_0 pypi suggests your numpy came from PyPI. and the wheel package on PyPI should create that directory.
Do you have any *.dll files in c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy at all? There should be one.

@achukumar001
Copy link
Author

Strange. The line numpy 1.16.1 pypi_0 pypi suggests your numpy came from PyPI. and the wheel package on PyPI should create that directory.
Do you have any *.dll files in c:\users\aswk\appdata\local\continuum\anaconda3\lib\site-packages\numpy at all? There should be one.

I don't have any *.dll file in that directory.

@mattip
Copy link
Member

mattip commented Feb 22, 2019

What steps did you take to install the software stack you are using?

@achukumar001
Copy link
Author

What steps did you take to install the software stack you are using?

Previously this was working well. I am using anaconda and spyder for programming. I updated the anaconda, python, tensorflow and other packages recently. By doing this I got compatibility issues and getting errors when running the code. So I downgraded again this python and tensorflow, so those issues got corrected. After that, I am getting this error when I try to run the tensorboard. I tried different versions of numpy. But still, I am getting the error.
I used pip to install these ones.

@rgommers
Copy link
Member

I used pip to install these ones.

don't do that in conda if you can avoid it. to fix this, try:

pip uninstall numpy
conda install numpy

@achukumar001
Copy link
Author

I used pip to install these ones.

don't do that in conda if you can avoid it. to fix this, try:

pip uninstall numpy
conda install numpy

I tried all these. Still, the error is the same.
So I uninstalled anaconda and reinstalled it. Now it's working.

@mattip
Copy link
Member

mattip commented Feb 25, 2019

Thanks for the update

@mattip mattip closed this as completed Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants