Cannot import name ‘MRG_RandomStreams’ from ‘theano.sandbox.rng_mrg’

  lasagne, python, python-3.x, theano

I tried importing Lasagne in my code which is as follows:

from __future__ import print_function
import sys
import os
import time
import string
import random
import pickle
import numpy as np
import theano
import theano.tensor as T
import lasagne

But on running the file I keep getting the following error:

  File "", line 12, in <module>
    import lasagne
  File "/usr/local/lib/python3.7/dist-packages/lasagne/", line 19, in <module>
    from . import layers
  File "/usr/local/lib/python3.7/dist-packages/lasagne/layers/", line 5, in <module>
    from .noise import *
  File "/usr/local/lib/python3.7/dist-packages/lasagne/layers/", line 6, in <module>
    from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
ImportError: cannot import name 'MRG_RandomStreams' from 'theano.sandbox.rng_mrg' (/usr/local/lib/python3.7/dist-packages/theano/sandbox/

Please help me resolve this issue.

Source: Python-3x Questions