无法在Spyder中导入包,同时可以在python终端中导入

时间:2018-02-12 23:52:36

标签: python path spyder

当我使用Python终端时,根本没有导入问题。但是当我尝试导入时,例如,keras或尝试使用scipy.misc.imsave()Spyder分别说ModuleNotFoundAttributeError: 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']

1 个答案:

答案 0 :(得分:0)