2

I have installed seq2seq on google colab but when I want to import it I get the error:

 **no module named "seq2seq"**

When I run:

!python3 drive/app/seq2seq-master/setup.py build
!python3 drive/app/seq2seq-master/setup.py install
import seq2seq

How do I import seq2seq correctly in this environment?

RenegadeAndy
  • 5,440
  • 18
  • 70
  • 130
hadeer
  • 19
  • 7

2 Answers2

3

Use git and pip to install it.

!git clone https://github.com/google/seq2seq.git
!pip install -e seq2seq

Then you can import seq2seq module

import seq2seq 
Ali
  • 41
  • 3
0

Initially, I tried with only pip. It didn't work in colab. Then I tried with git. And it worked perfectly.

!git clone https://github.com/google/seq2seq.git
!pip install -e seq2seq

Then import it and use it according to your need.

import seq2seq