Error importing scikit-image library in Python - python

I install Python 3.10.6 [MSC v.1932 32 bit (Intel)] on win32. Also install scikit-image in version'0.18.3'.
When I type "from skimage import io", the following error is displayed:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
from skimage import io
File "C:\Users\admin\AppData\Local\Programs\Python\Python310-32\lib\site-packages\skimage\io\__init__.py", line 11, in <module>
from ._io import *
File "C:\Users\admin\AppData\Local\Programs\Python\Python310-32\lib\site-packages\skimage\io\_io.py", line 4, in <module>
from ..color.colorconv import rgb2gray, rgba2rgb
File "C:\Users\admin\AppData\Local\Programs\Python\Python310-32\lib\site-packages\skimage\color\__init__.py", line 1, in <module>
from .colorconv import (convert_colorspace,
File "C:\Users\admin\AppData\Local\Programs\Python\Python310-32\lib\site-packages\skimage\color\colorconv.py", line 56, in <module>
from scipy import linalg
File "C:\Users\admin\AppData\Local\Programs\Python\Python310-32\lib\site-packages\scipy\linalg\__init__.py", line 198, in <module>
from ._misc import *
File "C:\Users\admin\AppData\Local\Programs\Python\Python310-32\lib\site-packages\scipy\linalg\_misc.py", line 3, in <module>
from .blas import get_blas_funcs
File "C:\Users\admin\AppData\Local\Programs\Python\Python310-32\lib\site-packages\scipy\linalg\blas.py", line 213, in <module>
from scipy.linalg import _fblas
ImportError: DLL load failed while importing _fblas: The specified module could not be found.
What is the problem? Please guide me. Thanks.

Related

ImportError: DLL load failed: The specified module could not be found after i download scipy for windows 64 using python 2.7

Traceback (most recent call last):
File "C:\D\MyNewProject\Sequential-RNN-Decoder-master\conv_codes_benchmark.py", line 5, in <module>
from utils import corrupt_signal, get_test_sigmas
File "C:\D\MyNewProject\Sequential-RNN-Decoder-master\utils.py", line 12, in <module>
from scipy import stats
File "C:\Python27\lib\site-packages\scipy\stats\__init__.py", line 345, in <module>
from .stats import *
File "C:\Python27\lib\site-packages\scipy\stats\stats.py", line 169, in <module>
import scipy.special as special
File "C:\Python27\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.
I have downloaded scipy for windows 64bit from https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy got above errors

ArcGIS 10.4.1 ImportError: cannot import name multiarray with numpy

I've installed ArcGIS 10.4.1, and with it the numpy 1.9.2 library. However, I get the following error when I try to run any scripts with numpy:
>>> import numpy
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python27\ArcGIS10.4\lib\site-packages\numpy\__init__.py", line
170, in <module>
from . import add_newdocs
File "C:\Python27\ArcGIS10.4\lib\site-packages\numpy\add_newdocs.py", line
13, in <module>
from numpy.lib import add_newdoc
File "C:\Python27\ArcGIS10.4\lib\site-packages\numpy\lib\__init__.py",
line 8, in <module>
from .type_check import *
File "C:\Python27\ArcGIS10.4\lib\site-packages\numpy\lib\type_check.py",
line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Python27\ArcGIS10.4\lib\site-packages\numpy\core\__init__.py",
line 6, in <module>
from . import multiarray
ImportError: cannot import name multiarray
I've tried uninstalling and re-installing ArcGIS, still with no luck.
Thanks in advance

Error in checking sklearn version

I am onto practising ML using python and visited through this link.
I installed all of the packages mentioned in the link namely, scipy, numpy, matplotlib, pandas, sklearn and implemented the following code to check their respective versions and proper installation,
# scikit-learn
import sklearn
print('sklearn: {}'.format(sklearn.__version__))
but got the following error:
Traceback (most recent call last):
File "VersionCheck.py", line 19, in <module>
import sklearn
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\sklearn\__init__.py", line 134, in <module>
from .base import clone
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\sklearn\base.py", line 13, in <module>
from .utils.fixes import signature
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\sklearn\utils\__init__.py", line 11, in <module>
from .validation import (as_float_array,
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\sklearn\utils\validation.py", line 18, in <module>
from ..utils.fixes import signature
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\sklearn\utils\fixes.py", line 144, in <module>
from scipy.sparse.linalg import lsqr as sparse_lsqr # noqa
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\sparse\linalg\__init__.py", line 114, in <module>
from .isolve import *
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 6, in <module>
from .iterative import *
File "C:\Users\HP\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 7, in <module>
from . import _iterative
ImportError: DLL load failed: The specified module could not be found.
To see a version of sklearn installed:
from sklearn import __version__
print(__version__)

Numpy Import Issue

I'm trying to run some code that uses the numpy library, but with only the statement
>>>import numpy
i get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\numpy\__init__.py", line 137, in <module>
import add_newdocs
File "C:\Python27\lib\site-packages\numpy\add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "C:\Python27\lib\site-packages\numpy\lib\__init__.py", line 4, in <module>
from type_check import *
File "C:\Python27\lib\site-packages\numpy\lib\type_check.py", line 8, in <module>
import numpy.core.numeric as _nx
File "C:\Python27\lib\site-packages\numpy\core\__init__.py", line 5, in <module>
import multiarray
ImportError: DLL load failed: %1 no es una aplicaci¾n Win32 vßlida.
I already done the numpy installation as follows:
pip install numpy
at the command line, and everithing was fine.
What's wrong?
I have 64 bits Windows 10 and python 2.7.13
Thanks!!

Numpy not found in python and found in ipython

I installed numpy using pip. when I run ipython, numpy is imported successfully but when I run python and import numpy I get
ImportError: No module named numpy
I tried to set $PYTHONPATH to /usr/local/lib/python2.7/dist-packages
but then I get
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py", line 180, in <module>
from . import add_newdocs
File "/usr/local/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/usr/local/lib/python2.7/dist-packages/numpy/core/__init__.py", line 14, in <module>
from . import multiarray
ImportError: /usr/local/lib/python2.7/dist-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS4_AsUnicodeEscapeString
I am using
python 2.7.6
and Ipython 4.1.1

Categories