sanyam5 / arc-pytorch

The first public PyTorch implementation of Attentive Recurrent Comparators
MIT License
148 stars 30 forks source link

download_data.py problems #1

Closed phobrain closed 7 years ago

phobrain commented 7 years ago

Python 2.7.10

  1. Maybe a python 3 thing? Or a 'force you to read the code, idiot' sort of thing? :-)

python download_data.py File "download_data.py", line 28 def extract() -> None: ^ SyntaxError: invalid syntax

Deleted the '-> None' pattern after ().

  1. urllib problems - Python 3 req't?

    File "download_data.py", line 2, in import urllib.request ImportError: No module named request (tensorflow) priot arc-pytorch% pip install urllib Collecting urllib Downloading urllib-1.21.1.tar.gz (226kB) ... Successfully installed urllib-1.21.1 (tensorflow) priot arc-pytorch% !py python download_data.py Traceback (most recent call last): File "download_data.py", line 2, in import urllib.request ImportError: No module named request

phobrain commented 7 years ago
  1. solved by

import urllib ... urllib.urlretrieve(...)

sanyam5 commented 7 years ago

Hi @phobrain, I wrote in Python 3. Sorry :/ You would need a virtual environment with Python 3 and pytorch>=0.2

I guess it should be possible to make the code cross-compatible across Python versions . Not sure though.