Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Two error when running seq2seq.test.pipeline_test with Anaconda3 on win7 #294

Open
fanjingwei opened this issue Aug 31, 2017 · 1 comment

Comments

@fanjingwei
Copy link

When i run python -m unittest seq2seq.test.pipeline_test, i get the follow errors:

ERROR: seq2seq (unittest.loader._FailedTest)

ImportError: Failed to import test module: seq2seq
Traceback (most recent call last):
File "C:\Program Files\Anaconda3\lib\unittest\loader.py", line 153, in loadTestsFromName
module = import(module_name)
File "E:\git\seq2seq\seq2seq_init_.py", line 26, in
from seq2seq import decoders
File "E:\git\seq2seq\seq2seq\decoders_init_.py", line 20, in
from seq2seq.decoders.attention_decoder import *
File "E:\git\seq2seq\seq2seq\decoders\attention_decoder.py", line 27, in
from seq2seq.contrib.seq2seq.helper import CustomHelper
File "E:\git\seq2seq\seq2seq\contrib\seq2seq\helper.py", line 35, in
from tensorflow.contrib.distributions.python.ops import bernoulli
ImportError: cannot import name 'bernoulli'


======================================================================
ERROR: seq2seq (unittest.loader._FailedTest)

ImportError: Failed to import test module: seq2seq
Traceback (most recent call last):
File "C:\Program Files\Anaconda3\lib\unittest\loader.py", line 153, in loadTestsFromName
module = import(module_name)
File "E:\git\seq2seq\seq2seq_init_.py", line 26, in
from seq2seq import decoders
File "E:\git\seq2seq\seq2seq\decoders_init_.py", line 20, in
from seq2seq.decoders.attention_decoder import *
File "E:\git\seq2seq\seq2seq\decoders\attention_decoder.py", line 27, in
from seq2seq.contrib.seq2seq.helper import CustomHelper
File "E:\git\seq2seq\seq2seq\contrib\seq2seq\helper.py", line 36, in
from tensorflow.contrib.distributions.python.ops import categorical
ImportError: cannot import name 'categorical'


I modify the follow two lines in /seq2seq/seq2seq/contrib/seq2seq/helper.py
from tensorflow.contrib.distributions.python.ops import bernoulli
from tensorflow.contrib.distributions.python.ops import categorical
to
from tensorflow.python.ops.distributions import bernoulli
from tensorflow.python.ops.distributions import categorical
to fix the erros.

But i think this is not the official way to fix this error, and i don't know why this happen.

@fanjingwei fanjingwei changed the title Two error when running seq2seq.test.pipeline_test with Anaconda3 Two error when running seq2seq.test.pipeline_test with Anaconda3 on win7 Aug 31, 2017
@hermansje
Copy link

This looks like the same error as this (also including fixes).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants