pip install sk-video
如果import skvideo时报如下错误:
>>> import skvideo
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\site-packages\sk_video-1.1.7-py2.7.egg\skvideo\__init__.
py", line 3, in
from .utils import check_output
File "C:\Python27\lib\site-packages\sk_video-1.1.7-py2.7.egg\skvideo\utils\__i
nit__.py", line 8, in
from .edge import canny
File "C:\Python27\lib\site-packages\sk_video-1.1.7-py2.7.egg\skvideo\utils\edg
e.py", line 8, in
import scipy.ndimage
ImportError: No module named scipy.ndimage
则是scipy包安装有问题,则去http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy下载相应的.whl文件,例如,我的电脑中安装的python版本是2.7.2,windows64位,则我需要下载scipy‑0.19.1‑cp27‑cp27m‑win_amd64.whl文件,然后用以下命令安装:
pip install scipy‑0.19.1‑cp27‑cp27m‑win_amd64.whl
如果安装scipy后,仍然报错,如果是一下错误:
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\site-packages\sk_video-1.1.7-py2.7.egg\skvideo\__init__.
py", line 3, in
from .utils import check_output
File "C:\Python27\lib\site-packages\sk_video-1.1.7-py2.7.egg\skvideo\utils\__i
nit__.py", line 8, in
from .edge import canny
File "C:\Python27\lib\site-packages\sk_video-1.1.7-py2.7.egg\skvideo\utils\edg
e.py", line 8, in
import scipy.ndimage
File "C:\Python27\lib\site-packages\scipy\__init__.py", line 61, in
from numpy._distributor_init import NUMPY_MKL # requires numpy+mkl
ImportError: cannot import name NUMPY_MKL
则去http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy下载相应的.whl文件,例如,我的电脑中安装的python版本是2.7.2,windows64位,则我需要下载numpy‑1.13.1+mkl‑cp27‑cp27m‑win_amd64.whl文件,然后用以下命令安装:
pip install numpy‑1.13.1+mkl‑cp27‑cp27m‑win_amd64.whl
执行以上操作后,我就可以成功使用skvideo模块了。