0

I'm trying to train an openNMT model using the instructions here - https://pypi.org/project/OpenNMT-py/

However I run into a problem while installing (using python setup.py install)

It runs into an error -

Processing dependencies for OpenNMT-py==1.1.1
Searching for torch>=1.4.0
Reading https://pypi.org/simple/torch/
No local packages or working download links found for torch>=1.4.0
error: Could not find suitable distribution for Requirement.parse('torch>=1.4.0')

I tried manually installing manually - python -m pip install torch==1.4.0 (because the link earlier says 1.4.0 is the only one supported, but it doesn't work. (Says No Matching Distribution found for torch==1.4.0)

  • 1
    What OS and python version do you have? Have you tried adding `-f https://download.pytorch.org/whl/torch_stable.html` to you `python -m pip install torch==1.40` command? – FlyingTeller May 28 '20 at 07:43
  • @FlyingTeller I'm on Windows, and I have Python 3.8.2. Yes, I tried that and it didnt work. I think it seems that they haven't uploaded the wheel files or whatever for windows for that particular version of torch – captain vhagar May 28 '20 at 09:33
  • 1
    Do you have 32 bit python installed by any chance? – FlyingTeller May 28 '20 at 11:16

1 Answers1

0

this worked for me on Windows 10, first install pytorch

conda install pytorch torchvision cudatoolkit=10.2 -c pytorch

then run the script

python -m pip install OpenNMT-py
Gonza Piotti
  • 707
  • 10
  • 10