Closed phobrain closed 7 years ago
import urllib ... urllib.urlretrieve(...)
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.
Python 2.7.10
python download_data.py File "download_data.py", line 28 def extract() -> None: ^ SyntaxError: invalid syntax
Deleted the '-> None' pattern after ().
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