ImportError:没有名为-python anaconda的模块
我只想运行这里给出的代码: 这是下载后lasagne draw master文件的目录结构:ImportError:没有名为-python anaconda的模块,python,python-2.7,github,anaconda,Python,Python 2.7,Github,Anaconda,我只想运行这里给出的代码: 这是下载后lasagne draw master文件的目录结构: lasagne-draw-master\ -->\deepmodels --> __init__.py, batchiterator.py, confusionmatrix.py -->\layers --> __init__.py, draw.py, draw_helpers.py, draw_helpers_
lasagne-draw-master\
-->\deepmodels
--> __init__.py, batchiterator.py, confusionmatrix.py
-->\layers
--> __init__.py, draw.py, draw_helpers.py, draw_helpers_test.py
-->\examples
--> mnist_draw.py, helper_functions.py
对于安装,我必须在安装Theano和Lasagne后执行这些步骤,如自述文件中所述。我也在千层面绘图主目录上
python setup.py develop
cd ..
python -c 'import deepmodels'
上述两个命令执行得非常完美。但当我执行第三个命令时,它会显示以下错误:
File "<string>", line 1, in <module>
File "deepmodels\__init__.py", line 2, in <module>
from . import layers
File "deepmodels\layers\__init__.py", line 1, in <module>
from .base import *
ImportError: No module named base
deepmodels\layers\uuuuu init\uuuuuu.py的内容是:
from . import confusionmatrix
from . import layers
from . import batchiterator
from .base import *
from .draw import *
我使用的是蟒蛇。init.py文件或其他文件中是否存在语法错误?我刚刚解决了问题,并通过在init.py和draw.py(在层目录中)文件中进行以下修改来解决这些问题
deepmodels/init.py
change followings
from . import confusionmatrix
from . import layers
from . import batchiterator
to follows;
import confusionmatrix
import layers
import batchiterator
deepmodels/layers/init.py
change followings
from .base import *
from .draw import *
to as follows;
from lasagne.layers.base import *
from draw import *
deepmodels/layers/draw.py
line 8
comment out from .. import logdists