当我使用Python终端时,根本没有进口问题。但是,当我尝试导入时,例如keras或尝试分别使用scipy.misc.imsave((Spyder分别说ModuleNotFound
和AttributeError: module 'scipy.misc' has no attribute 'imsave'
。以下是Python终端和Spyder的Sys.Path。我感谢解决此问题的任何解决方案。
python 3.6.3端子
['',
'C:\Users\kaany\AppData\Local\Programs\Python\Python36\python36.zip',
'C:\Users\kaany\AppData\Local\Programs\Python\Python36\DLLs',
'C:\Users\kaany\AppData\Local\Programs\Python\Python36\lib',
'C:\Users\kaany\AppData\Local\Programs\Python\Python36',
'C:\Users\kaany\AppData\Local\Programs\Python\Python36\lib\site-packages',
'C:\Users\kaany\AppData\Local\Programs\Python\Python36\lib\site-packages\mudicom-0.1.2-py3.6.egg']
spyder
['',
'C:\Users\kaany\Anaconda3\python36.zip',
'C:\Users\kaany\Anaconda3\DLLs',
'C:\Users\kaany\Anaconda3\lib',
'C:\Users\kaany\Anaconda3',
'C:\Users\kaany\Anaconda3\lib\site-packages',
'C:\Users\kaany\Anaconda3\lib\site-packages\Babel-2.5.0-py3.6.egg',
'C:\Users\kaany\Anaconda3\lib\site-packages\Mako-1.0.7-py3.6.egg',
'C:\Users\kaany\Anaconda3\lib\site-packages\win32',
'C:\Users\kaany\Anaconda3\lib\site-packages\win32\lib',
'C:\Users\kaany\Anaconda3\lib\site-packages\Pythonwin',
'C:\Users\kaany\Anaconda3\lib\site-packages\IPython\extensions',
'C:\Users\kaany\.ipython']
https://github.com/flatironirinstitute/caiman/wiki/setting-up-python-and-getting-to-cognting-to-know-spy-spyder
您的PythonPath是否正确设置了?