我在導入skimage.color
模塊時遇到問題。雖然我可以從python shell導入並調用skimage.color.rgb2gray
,但是我無法從我的應用程序執行相同的操作。skimage.color.rgb2gray導入問題
我在我的電腦上檢查了skimage
lib地方。他們似乎都很好。但是當我嘗試調用skimage.color時。從我的代碼它總是給我這個
Traceback (most recent call last):
File "main-video2.py", line 44, in <module>
image = color.rgb2gray(image)
我檢查了這樣
[email protected]:~/dev/computer_vision$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
KeyboardInterrupt
>>> from skimage import color
>>> color
<module 'skimage.color' from '/usr/local/lib/python2.7/dist-packages/skimage/color/__init__.pyc'>
任何人的模塊可以幫助我理解爲什麼會同時我能夠從外殼調用它的原因,但不是從我的代碼?
我認爲這可能不是模塊的錯 - 你能把你的代碼放在問題中嗎? (另外,如果你想知道這個錯誤是否是由於模塊導入不正確導致的,那麼在你的'image = color.rgb2gray(image)''後面會出現'ImportError') – Jerrybibo