generating-reviews-discovering-sentiment icon indicating copy to clipboard operation
generating-reviews-discovering-sentiment copied to clipboard

Add a requirements.txt

Open sjqtentacles opened this issue 7 years ago • 5 comments

Getting a weird module version issue with tensorflow and the method 'unpack' not being an attribute. Would be helpful if a requirements.txt file was included to use with virtualenv.

sjqtentacles avatar Apr 06 '17 19:04 sjqtentacles

I'm similarly having trouble with the html dependency - cannot run the code because html.unescape is not found (even after installing html via pip).

edit: aha, this seems to imply python3. so it would be good to note that.

update: code now works fine for me with Python 3.5.3 and tensorflow (0.12.1).

dribnet avatar Apr 06 '17 23:04 dribnet

@dribnet for python 2 you can use text=HTMLParser.HTMLParser().unescape(text)

@Nixonite you might run it in anaconda, that would make it easier to make it work I think

bitliner avatar Apr 09 '17 11:04 bitliner

Using HTMLParser doesn't work exactly like you would want it to - I think you found this in #2 as well. I'm not sure what the way to fix it is in python 2 is, though.

dthiagarajan avatar Apr 09 '17 14:04 dthiagarajan

Use python3 and pip3.

Added requirements.txt in this PR. #43

igauravsehrawat avatar Oct 16 '17 17:10 igauravsehrawat

This should work well with python 3.6, but not python 2.7.

I did a mistake with html.unescape(). Because I use python 2.7, I did change the code to

HTMLParser.HTMLParser().unescape(text)

After I import HTMLParser

This turned out to be a bad idea.

So again, my recommendation is to use python 3.6 to run this amazing work.

Hope this helps other people who have this problem as well.

hoangcuong2011 avatar Nov 09 '17 22:11 hoangcuong2011