Import error when using skvideo.io - python

I am trying to import skvideo.io in python 3.6.3 but getting an import error. I installed skvideo through pip and it was installed successfully.
The is the error I am getting
Traceback (most recent call last): File "", line 1, in
import skvideo.io File "C:\Users\Hasan\AppData\Local\Programs\Python\Python36\lib\site-packages\skvideo__init__.py",
line 3, in
from .utils import check_output, where File "C:\Users\Hasan\AppData\Local\Programs\Python\Python36\lib\site-packages\skvideo\utils__init__.py",
line 10, in
from .edge import canny File "C:\Users\Hasan\AppData\Local\Programs\Python\Python36\lib\site-packages\skvideo\utils\edge.py",
line 8, in
import scipy.ndimage File "C:\Users\Hasan\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\ndimage__init__.py",
line 161, in
from .filters import * File "C:\Users\Hasan\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\ndimage\filters.py",
line 37, in
from scipy.misc import doccer File "C:\Users\Hasan\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\misc__init__.py",
line 67, in
from scipy.interpolate._pade import pade as _pade File "C:\Users\Hasan\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\interpolate__init__.py",
line 175, in
from .interpolate import * File "C:\Users\Hasan\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\interpolate\interpolate.py",
line 20, in
import scipy.linalg File "C:\Users\Hasan\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\linalg__init__.py",
line 186, in
from .misc import * File "C:\Users\Hasan\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\linalg\misc.py",
line 5, in
from .blas import get_blas_funcs File "C:\Users\Hasan\AppData\Local\Programs\Python\Python36\lib\site-packages\scipy\linalg\blas.py",
line 196, in
from scipy.linalg import _fblas ImportError: DLL load failed: The specified module could not be found.
Can someone help me out

Related

Error importing scikit-image library in 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.

Problem with install seaborn module in Pycharm Application

I am trying the import the seaborn module (using Python 3.7) into my project (I'm using the Pycharm application). Here's my code:
import os
import google_auth_oauthlib.flow
import googleapiclient.discovery
import pandas as pd
import seaborn as sns
Here's the error message that I got executing the above code:
Traceback (most recent call last):
File "C:/Users/user/PycharmProjects/test/main.py", line 6, in <module>
import seaborn
File "C:\Users\user\PycharmProjects\test\venv\lib\site-packages\seaborn\__init__.py", line 6, in <module>
from .rcmod import *
File "C:\Users\user\PycharmProjects\test\venv\lib\site-packages\seaborn\rcmod.py", line 7, in <module>
from . import palettes, _orig_rc_params
File "C:\Users\user\PycharmProjects\test\venv\lib\site-packages\seaborn\palettes.py", line 9, in <module>
from .utils import desaturate, set_hls_values, get_color_cycle
File "C:\Users\user\PycharmProjects\test\venv\lib\site-packages\seaborn\utils.py", line 6, in <module>
from scipy import stats
File "C:\Users\user\PycharmProjects\test\venv\lib\site-packages\scipy\__init__.py", line 136, in <module>
from . import _distributor_init
File "C:\Users\user\PycharmProjects\test\venv\lib\site-packages\scipy\_distributor_init.py", line 61, in <module>
WinDLL(os.path.abspath(filename))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2288.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
Does anyone know why the seaborn module could not be found? I added the seaborn package already using the python interpreter.

ABI incompatibility while importing `scipy.sparse`

I'm running a script in a virtual environment on a new machine. Running the script gives me the following traceback.
Traceback:
Traceback (most recent call last):
File "zoneMapRGB.py", line 11, in <module>
from skimage import io, color
File "/opt/python/3.6/lib/python3.6/site-packages/skimage/io/__init__.py", line 11, in <module>
from ._io import *
File "/opt/python/3.6/lib/python3.6/site-packages/skimage/io/_io.py", line 7, in <module>
from ..color import rgb2grey
File "/opt/python/3.6/lib/python3.6/site-packages/skimage/color/__init__.py", line 1, in <module>
from .colorconv import (convert_colorspace,
File "/opt/python/3.6/lib/python3.6/site-packages/skimage/color/colorconv.py", line 368, in <module>
rgb_from_xyz = linalg.inv(xyz_from_rgb)
File "/opt/python/3.6/lib/python3.6/site-packages/scipy/linalg/basic.py", line 947, in inv
a1 = _asarray_validated(a, check_finite=check_finite)
File "/opt/python/3.6/lib/python3.6/site-packages/scipy/_lib/_util.py", line 228, in _asarray_validated
import scipy.sparse
File "/opt/python/3.6/lib/python3.6/site-packages/scipy/sparse/__init__.py", line 229, in <module>
from .csr import *
File "/opt/python/3.6/lib/python3.6/site-packages/scipy/sparse/csr.py", line 15, in <module>
from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
ImportError: /opt/matlab/extern/engines/python/dist/matlab/engine/glnxa64/../../../../../../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /opt/python/3.6/lib/python3.6/site-packages/scipy/sparse/_sparsetools.cpython-36m-x86_64-linux-gnu.so)
It seems scipy is trying to get libstdc++.so.6 from a matlab folder instead of the python directory. Is there any way to correct this behavior?

Py2exe + nibabel

When I try to launch the application (.exe) file created by p2toexe, I receive the following error message:
Traceback (most recent call last):
File "main_GUI.py", line 12, in <module>
File "nibabel\__init__.pyc", line 38, in <module>
File "nibabel\analyze.pyc", line 87, in <module>
File "nibabel\volumeutils.pyc", line 22, in <module>
File "nibabel\casting.pyc", line 11, in <module>
File "nibabel\testing\__init__.pyc", line 35, in <module>
File "nibabel\testing\np_features.pyc", line 19, in <module>
File "nibabel\testing\np_features.pyc", line 12, in _memmap_after_ufunc
IOError: [Errno 2] No such file or directory: 'C:\\Work\\PyToExe\\GUI\\v4\\dist\\lib2\\library.lib\\nibabel\\testing\\np_features.pyc'
When I ran the original Python script, no errors were raised with regard to importing nibabel.
In response to #Sagar's comment:
The import in the file Main_GUI.m:
from __future__ import print_function
import matplotlib.pyplot as plt
from matplotlib import widgets
import numpy as np
import nibabel as nib
import matplotlib as mpl
import time
import os
there was a problem of compatibility between the modules versions (py2exe==0.6.9 and nibabel==2.2.0).
It works with py2exe 0.6.9 and nibabel 2.1.0.

Problems with matplotlib

I'm trying to make a graph using matplotlib.pyplot and subprocess, but I get the following error:
Traceback (most recent call last):
File "subprocess.py", line 2, in <module>
import matplotlib.pyplot as plt
File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 105, in <module>
import os, re, shutil, subprocess, sys, warnings
File "/home/igor/Documentos/subprocess.py", line 2, in <module>
import matplotlib.pyplot as plt
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 20, in <module>
from matplotlib import _pylab_helpers, interactive
ImportError: cannot import name interactive
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
from apport.report import Report
File "/usr/lib/python2.7/dist-packages/apport/report.py", line 12, in <module>
import subprocess, tempfile, os.path, urllib, re, pwd, grp, os
File "/home/igor/Documentos/subprocess.py", line 2, in <module>
import matplotlib.pyplot as plt
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 20, in <module>
from matplotlib import _pylab_helpers, interactive
ImportError: cannot import name _pylab_helpers
If I try to do a graph not using subprocess (just plotting 2 arrays as axes), I don't get this problem.
Can someone help me?

Categories