scikit-image - Missing DLL - python

I have installed scikit-image from a binary but when I run this command:
from skimage.measure import structural_similarity
I get this error:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from skimage.measure import structural_similarity as ssim
File "C:\Python27\lib\site-packages\skimage\measure\__init__.py", line 4, in <module>
from ._regionprops import regionprops, perimeter
File "C:\Python27\lib\site-packages\skimage\measure\_regionprops.py", line 8, in <module>
from . import _moments
File "C:\Python27\lib\site-packages\skimage\measure\_moments.py", line 3, in <module>
from . import _moments_cy
ImportError: DLL load failed: The specified module could not be found.
There is a file named _moments_cy.pyd in that directory, not sure if that's what it's asking for.

from skimage.metrics import structural_similarity as ssim
The module is now moved to metrics instead of measure.

Related

Python to read text from picture giving some import package errors

Unable to read text from a picture using PIL and pytesseract
import PIL
from PIL import Image
import pytesseract
im = PIL.Image.open('C:\\Users\\Edgar.Lizarraga\\Desktop\\Kaizen-Continuous-Improvement-Model.png')
x = pytesseract.image_to_string(im)
print(x)
giving me the following message:
Traceback (most recent call last):
File "C:\Users\Edgar.Lizarraga\AppData\Local\Continuum\anaconda33\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
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/Edgar.Lizarraga/PycharmProjects/Pic2/pic2.py", line 3, in <module>
import pytesseract
File "C:\Users\Edgar.Lizarraga\AppData\Local\Continuum\anaconda33\lib\site-packages\pytesseract\__init__.py", line 1, in <module>
from .pytesseract import (
File "C:\Users\Edgar.Lizarraga\AppData\Local\Continuum\anaconda33\lib\site-packages\pytesseract\pytesseract.py", line 27, in <module>
from numpy import ndarray
File "C:\Users\Edgar.Lizarraga\AppData\Local\Continuum\anaconda33\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\Users\Edgar.Lizarraga\AppData\Local\Continuum\anaconda33\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Users\Edgar.Lizarraga\AppData\Local\Continuum\anaconda33\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Users\Edgar.Lizarraga\AppData\Local\Continuum\anaconda33\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Users\Edgar.Lizarraga\AppData\Local\Continuum\anaconda33\lib\site-packages\numpy\core\__init__.py", line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified module could not be found.
I'm not sure if this could cause the issue but you should't need to import both PIL and PIL.Image.
Would comment this but I don't have 50 rep.

Seaborn import error

I have been trying to import Seaborn in Python 3.6 but I always get an error:
ImportError: DLL load failed: The specified module could not be found.
I tried to install 2 DLLs (msvcp71 and msvcr71) but that did not help. I am using Windows 10.
The full error is:
import seaborn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python36\lib\site-packages\seaborn\__init__.py", line 6, in <module>
from .rcmod import *
File "C:\Python36\lib\site-packages\seaborn\rcmod.py", line 8, in <module>
from . import palettes, _orig_rc_params
File "C:\Python36\lib\site-packages\seaborn\palettes.py", line 12, in <module>
from .utils import desaturate, set_hls_values, get_color_cycle
File "C:\Python36\lib\site-packages\seaborn\utils.py", line 7, in <module>
from scipy import stats
File "C:\Python36\lib\site-packages\scipy\stats\__init__.py", line 343, in <module>
from .stats import *
File "C:\Python36\lib\site-packages\scipy\stats\stats.py", line 169, in <module>
import scipy.special as special
File "C:\Python36\lib\site-packages\scipy\special\__init__.py", line 640, in <module>
from ._ufuncs import *
ImportError: DLL load failed: The specified module could not be found.
The problem was in Scipy so I uninstalled (pip uninstall) it and then reinstalled Scipy. Also reinstalled seaborn. That worked.
Trying to install from .whl didn't work but pip worked.

Import modules from sklearn I get ImportError: DLL load failed: The specified module could not be found

recently I have been trying to get into machine learning, AI, ect and the tutorial i was following told me to import linear_model from sklearn what i used to import that is as follows:
from sklearn import linear_models
if I run this code alone I get the error:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from sklearn import linear_model
File "C:\Users\Leo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sklearn\linear_model\__init__.py", line 15, in <module>
from .least_angle import (Lars, LassoLars, lars_path, LarsCV, LassoLarsCV,
File "C:\Users\Leo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sklearn\linear_model\least_angle.py", line 23, in <module>
from ..utils import arrayfuncs, as_float_array, check_X_y, deprecated
ImportError: DLL load failed: The specified module could not be found.

pip install of statsmodels is not working. DLL load failed: The specified module could not be found

I am really new to python and I am trying to install the statsmodels module. It seems that since I am on a 64 bits I need to use the following unofficial website http://www.lfd.uci.edu/ I did all I know about how to download a whl and I did download it and used the pip afterwards and all work fine. now when I do pip install statsmodels it work fine. However, in my shell after I try import the stats models I am getting
import statsmodels
Traceback (most recent call last): File "<pyshell#7>", line 1, in <module>
import statsmodels File "D:\Python34\lib\site-packages\statsmodels\__init__.py", line 8, in <module>
from .tools.sm_exceptions import (ConvergenceWarning, CacheWriteWarning, File "D:\Python34\lib\site-packages\statsmodels\tools\__init__.py", line 1, in <module>
from .tools import add_constant, categorical File "D:\Python34\lib\site-packages\statsmodels\tools\tools.py", line 8, in <module>
from scipy.linalg import svdvals File "D:\Python34\lib\site-packages\scipy\linalg\__init__.py", line 174, in <module>
from .misc import * File "D:\Python34\lib\site-packages\scipy\linalg\misc.py", line 5, in <module>
from .blas import get_blas_funcs File "D:\Python34\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.
Any help would be much appreciated.
Thank you in advance

What module is missing when I try to import skimage? Python 3.5

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.

Categories

Resources