ImportError: cannot import name 'int_types'-Lasagne

2,073 views
Skip to first unread message

jw3...@columbia.edu

unread,
Jul 18, 2018, 10:35:47 AM7/18/18
to lasagne-users
I follow the instructions on http://lasagne.readthedocs.io/en/latest/user/installation.html and type
pip install --upgrade https://github.com/Theano/Theano/archive/master.zip
pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip
to install Lasagne and Theano in order to make them work together.

But when I import lasagne, it always run out with the ImportError: cannot import name 'int_types'.

Details are:
ImportError                               Traceback (most recent call last)
<ipython-input-9-459e2facf67c> in <module>()
----> 1 import lasagne

~/project/anaconda3/envs/dlnn/lib/python3.6/site-packages/lasagne/__init__.py in <module>()
     24 from . import nonlinearities
     25 from . import init
---> 26 from . import layers
     27 from . import objectives
     28 from . import random

~/project/anaconda3/envs/dlnn/lib/python3.6/site-packages/lasagne/layers/__init__.py in <module>()
      7 from .local import *
      8 from .pool import *
----> 9 from .shape import *
     10 from .merge import *
     11 from .normalization import *

~/project/anaconda3/envs/dlnn/lib/python3.6/site-packages/lasagne/layers/shape.py in <module>()
      3 
      4 from ..theano_extensions import padding
----> 5 from ..utils import int_types
      6 
      7 from .base import Layer

Plz help me! Thank you!

jw3...@columbia.edu

unread,
Jul 18, 2018, 10:37:57 AM7/18/18
to lasagne-users
And my Python is 3.6.

92.d...@gmail.com

unread,
Oct 11, 2018, 1:36:03 PM10/11/18
to lasagne-users

I'm having the same problem. Does anyone know why is it so and what can be done?

zdw...@gmail.com

unread,
May 10, 2019, 3:42:01 AM5/10/19
to lasagne-users
pip install lasagne==0.1

在 2018年7月18日星期三 UTC+8下午10:35:47,jw3...@columbia.edu写道:
Reply all
Reply to author
Forward
0 new messages