I tried to import ndimage package from SciPy to use the maximum filter in it. However, it seems SciPy is missing this part. I got this error:
from scipy.linalg import _fblas
ImportError: DLL load failed: The specified module could not be found.
I even tried these as well (separately):
import scipy.ndimage
from scipy.ndimage.filters import maximum_filter
import ndimage form scipy
But I still get the same error.
The complete error is:
Traceback (most recent call last):
File "C:\Users\Programs\PyCharm\PyCharm Community Edition 2017.2.4\helpers\pydev\pydevd.py", line 1599, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Users\Programs\PyCharm\PyCharm Community Edition 2017.2.4\helpers\pydev\pydevd.py", line 1026, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Users\Programs\PyCharm\PyCharm Community Edition 2017.2.4\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/Desktop/Test_2/test.py", line 2, in <module>
import scipy.ndimage
File "C:\Users\Programs\Python 3.6\lib\site-packages\scipy\ndimage\__init__.py", line 161, in <module>
from .filters import *
File "C:\Users\Programs\Python 3.6\lib\site-packages\scipy\ndimage\filters.py", line 37, in <module>
from scipy.misc import doccer
File "C:\Users\Programs\Python 3.6\lib\site-packages\scipy\misc\__init__.py", line 67, in <module>
from scipy.interpolate._pade import pade as _pade
File "C:\Users\Programs\Python 3.6\lib\site-packages\scipy\interpolate\__init__.py", line 175, in <module>
from .interpolate import *
File "C:\Users\Programs\Python 3.6\lib\site-packages\scipy\interpolate\interpolate.py", line 20, in <module>
import scipy.linalg
File "C:\Users\Programs\Python 3.6\lib\site-packages\scipy\linalg\__init__.py", line 186, in <module>
from .misc import *
File "C:\Users\Programs\Python 3.6\lib\site-packages\scipy\linalg\misc.py", line 5, in <module>
from .blas import get_blas_funcs
File "C:\Users\Programs\Python 3.6\lib\site-packages\scipy\linalg\blas.py", line 196, in <module>
from scipy.linalg import _fblas
ImportError: DLL load failed: The specified module could not be found.
I tried two methods and they helped me to solve this problem:
1- Uninstall SciPy and NumPy and reinstall them again,
2- If you are using SciPy 1.0.0, downgrade it to a previous version (e.g. I downgraded it to SciPy 0.19.1). This one was suggested by #Brad Solomon
I'm sure one of these is the solution!
Related
I run a python program about Face Recognition and I get this problem. please anyone can suggest me how I can fix this problem. sorry for my bad English skill. Thank you.
Traceback (most recent call last):
File "D:\FaceRecognition.py", line 1, in <module>
from facerec.feature import Fisherfaces
File "C:\Python27\lib\site-packages\facerec\feature.py", line 44, in <module>
from facerec.util import asColumnMatrix
File "C:\Python27\lib\site-packages\facerec\util.py", line 9, in <module>
from scipy import ndimage
File "C:\Python27\lib\site-packages\scipy\ndimage\__init__.py", line 161, in <module>
from .filters import *
File "C:\Python27\lib\site-packages\scipy\ndimage\filters.py", line 37, in <module>
from scipy.misc import doccer
File "C:\Python27\lib\site-packages\scipy\misc\__init__.py", line 51, in <module>
from scipy.special import comb, factorial, factorial2, factorialk
File "C:\Python27\lib\site-packages\scipy\special\__init__.py", line 627, in <module>
from ._ufuncs import *
ImportError: DLL load failed: The specified module could not be found.
Python 2.7.10 (32-bits)
Windows 7
numpy-1.11.0+mkl-cp27-cp27m-win32
pip-8.0.3-py2.py3-none-any
scipy-0.17.0-cp27-none-win32
opencv 2.4.11
I'm trying to run a script my client has provided, but I can't get it to start; it seems certainly a setup question on my machine, as it works for them. I started by installing WinPython from http://scipy.org/, but I'm now getting the following traceback:
Traceback (most recent call last):
File "pyconsole.py", line 18, in <module>
import cocomo
File "pyconsole\cocomo.py", line 13, in <module>
import grupple
File "pyconsole\grupple.py", line 4, in <module>
import matplotlib.mlab as mlab
File "C:\Users\lab\AppData\Roaming\Python\Python27\site-packages\matplotlib\__init__.py", line 134, in <module>
from matplotlib.rcsetup import (defaultParams,
File "C:\Users\lab\AppData\Roaming\Python\Python27\site-packages\matplotlib\rcsetup.py", line 19, in <module>
from matplotlib.colors import is_color_like
File "C:\Users\lab\AppData\Roaming\Python\Python27\site-packages\matplotlib\colors.py", line 52, in <module>
import numpy as np
File "C:\Users\lab\AppData\Roaming\Python\Python27\site-packages\numpy\__init__.py", line 137, in <module>
import add_newdocs
File "C:\Users\lab\AppData\Roaming\Python\Python27\site-packages\numpy\add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "C:\Users\lab\AppData\Roaming\Python\Python27\site-packages\numpy\lib\__init__.py", line 13, in <module>
from polynomial import *
File "C:\Users\lab\AppData\Roaming\Python\Python27\site-packages\numpy\lib\polynomial.py", line 17, in <module>
from numpy.linalg import eigvals, lstsq, inv
File "C:\Users\lab\AppData\Roaming\Python\Python27\site-packages\numpy\linalg\__init__.py", line 48, in <module>
from linalg import *
File "C:\Users\lab\AppData\Roaming\Python\Python27\site-packages\numpy\linalg\linalg.py", line 23, in <module>
from numpy.linalg import lapack_lite
ImportError: DLL load failed: The specified module could not be found.
I'm not confident in interpreting Python tracebacks, but it seems that "lapack_lite" is missing? Searching around a bit seems surprisingly unhelpful; the best I've seemed to determine is that it is part of numpy? But that's odd, as the reason I started with the WinPython distribution is that the numpy stack is pre-installed, and that is the easiest way to get started with that.
What am I missing?
Thanks!
i think the easiest way under Windows would be to simply install Anaconda (this takes care of all the dependencies of Numpy and Scipy). You can download it from here:
https://www.continuum.io/downloads
This way you dont have to scroll through pages of Documentation on how to get all dependencies right.
Kind regards
Johann
When I run the line from skimage import io I get the following:
Traceback (most recent call last):
File "C:\Users\Dilshad\Desktop\project_7-8-2015\8_bands\Program_camera.py", line 16, in <module>
from Functions_8bands import *
File "C:\Users\Dilshad\Desktop\project_7-8-2015\8_bands\Functions_8bands.py", line 5, in <module>
from skimage import io
File "C:\Users\Dilshad\AppData\Local\Programs\Python\Python35\lib\site-packages\skimage\io\__init__.py", line 11, in <module>
from ._io import *
File "C:\Users\Dilshad\AppData\Local\Programs\Python\Python35\lib\site-packages\skimage\io\_io.py", line 8, in <module>
from ..color import rgb2grey
File "C:\Users\Dilshad\AppData\Local\Programs\Python\Python35\lib\site-packages\skimage\color\__init__.py", line 1, in <module>
from .colorconv import (convert_colorspace,
File "C:\Users\Dilshad\AppData\Local\Programs\Python\Python35\lib\site-packages\skimage\color\colorconv.py", line 58, in <module>
from scipy import linalg
File "C:\Users\Dilshad\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\linalg\__init__.py", line 172, in <module>
from .misc import *
File "C:\Users\Dilshad\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\linalg\misc.py", line 5, in <module>
from .blas import get_blas_funcs
File "C:\Users\Dilshad\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\linalg\blas.py", line 155, in <module>
from scipy.linalg import _fblas
ImportError: DLL load failed: The specified module could not be found.
I've searched through the site-package file and I see that io exists so I'm not really sure whats's missing.
Not sure why it worked but installing numpy +mkl instead of numpy vanilla from the unofficial binary site on UCI got around this for me.
I have system with win7 x64 and code which worked well before with Anaconda2-2.4.0-Windows-x86
from sklearn.linear_model import LinearRegression
But now I get:
File "C:\Anaconda2\lib\site-packages\sklearn\linear_model\__init__.py", line 1
2, in <module>
from .base import LinearRegression
File "C:\Anaconda2\lib\site-packages\sklearn\linear_model\base.py", line 28, i
n <module>
from ..utils import as_float_array, check_array, check_X_y
File "C:\Anaconda2\lib\site-packages\sklearn\utils\__init__.py", line 16, in <
module>
from .class_weight import compute_class_weight, compute_sample_weight
File "C:\Anaconda2\lib\site-packages\sklearn\utils\class_weight.py", line 7, i
n <module>
from ..utils.fixes import in1d
File "C:\Anaconda2\lib\site-packages\sklearn\utils\fixes.py", line 318, in <mo
dule>
from scipy.sparse.linalg import lsqr as sparse_lsqr
File "C:\Anaconda2\lib\site-packages\scipy\sparse\linalg\__init__.py", line 11
3, in <module>
from .matfuncs import *
File "C:\Anaconda2\lib\site-packages\scipy\sparse\linalg\matfuncs.py", line 19
, in <module>
import scipy.misc
File "C:\Anaconda2\lib\site-packages\scipy\misc\__init__.py", line 49, in <mod
ule>
from scipy.special import comb, factorial, factorial2, factorialk
File "C:\Anaconda2\lib\site-packages\scipy\special\__init__.py", line 601, in
<module>
from ._ufuncs import *
ImportError: DLL load failed: The specified procedure could not be found.
Yesterday, I have installed software which brings some python with itself and look like does something else during installation.
In Dependency walker I see following picture:
I have installed Anaconda2-2.4.0-Windows-x86_64 and in this python version all works fine.
Could you please help me to understand what has been changed in system and how I can fix it?(I have completely remove installed software but it does not help)
When I try to use this command line to run this python code:
~/Tools/find_differential_primers/utils python stitch_six_frame_stops.py seq.fa
Error code will be displayed as followed. could you help me solve this problem.
Traceback (most recent call last):
File "stitch_six_frame_stops.py", line 55, in <module>
import matplotlib
File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.x-py2.7-macosx-10.8 intel.egg/matplotlib/__init__.py", line 129, in <module>
from matplotlib.cbook import is_string_like
File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.x-py2.7-macosx-10.8-intel.egg/matplotlib/cbook.py", line 28, in <module>
import numpy as np
File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.0.dev_3084618_20130514-py2.7-macosx-10.8-intel.egg/numpy/__init__.py", line 140, in <module>
from . import add_newdocs
File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.0.dev_3084618_20130514-py2.7-macosx-10.8-intel.egg/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.0.dev_3084618_20130514-py2.7-macosx-10.8-intel.egg/numpy/lib/__init__.py", line 6, in <module>
from .type_check import *
File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.0.dev_3084618_20130514-py2.7-macosx-10.8-intel.egg/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.0.dev_3084618_20130514-py2.7-macosx-10.8-intel.egg/numpy/core/__init__.py", line 6, in <module>
from . import multiarray
ImportError: /usr/local/lib/python2.7/dist-packages/numpy-1.8.0.dev_3084618_20130514-py2.7-macosx-10.8-intel.egg/numpy/core/multiarray.so: invalid ELF header
You are trying to use a .so file in Mac OSX! .so files work on Linux; Mac OSX works with .dynld files. You probably may want to verify your NumPy Installation.
Assuming you are using OSX Lion, please see here for how to install NumPy on the OSX.