0

I have just installed both Theano and Lasagne using conda for Theano and pip for Lasagne. Both reside in subdirectories under " C:\Users\chets\anaconda3\envs\tensorflow\Lib\site-packages". The following code works:

import theano

The following code does not:

import lasagne  

The error message for the latter is: "import lasagne Traceback (most recent call last):

File "C:\Users\chets\AppData\Local\Temp/ipykernel_5612/2601130582.py", line 1, in import lasagne

File "c:\Users\chets\anaconda3\envs\tensorflow\lib\site-packages\lasagne_init_.py", line 19, in from . import layers

File "c:\Users\chets\anaconda3\envs\tensorflow\lib\site-packages\lasagne\layers_init_.py", line 7, in from .pool import *

File "c:\Users\chets\anaconda3\envs\tensorflow\lib\site-packages\lasagne\layers\pool.py", line 6, in from theano.tensor.signal import downsample

ImportError: cannot import name 'downsample' from 'theano.tensor.signal' (c:\Users\chets\anaconda3\envs\tensorflow\lib\site-packages\theano\tensor\signal_init_.py)"

cseligman
  • 1
  • 3
  • Maybe you have a Theano version where `downsample` is not in `theano.tensor.signal`, see [this answer](https://stackoverflow.com/a/39501251/5231110)? In that case maybe the Lasagne version doesn't match the Theano version. Try installing both as per the Lasagne documentation, for example. – root Aug 09 '21 at 23:04

1 Answers1

0

checked in Colab ,was getting different but similar error .Then ,I followed instructions from their lasagne github link after which it vanished .Here is the proper way install to lasagne

pip install -r https://raw.githubusercontent.com/Lasagne/Lasagne/master/requirements.txt
pip install https://github.com/Lasagne/Lasagne/archive/master.zip

attaching gist for reference.