allenai / allennlp

An open-source NLP research library, built on PyTorch.
http://www.allennlp.org
Apache License 2.0
11.73k stars 2.24k forks source link

Could not find a version that satisfies the requirement torch #3232

Closed joseakamaru closed 5 years ago

joseakamaru commented 5 years ago

Describe the bug I have followed the installation instructions mentioned on the Github Readme and from the Allenai Website, but I always received the following prompt on the command line.

ERROR: Could not find a version that satisfies the requirement torch<1.2,>=0.4.1 (from allennlp) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch<1.2,>=0.4.1 (from allennlp)

I have tried installing the conda environment, but that has failed also. I received the same error regardless of the method of installation.

To Reproduce Steps to reproduce the behavior

  1. Install Anaconda and ensure that its part of your PATH
  2. From the command prompt, run the following conda create -n allennlp python=3.6
  3. Activate conda enviroment via 'conda activate allennlp'
  4. Then install the allennlp running the following on the command prompt: pip install allennlp
  5. See error image

Expected behavior I expected a clean download and install of the allennlp.

System (please complete the following information):

Additional context Add any other context about the problem here.

joelgrus commented 5 years ago

technically allennlp is not supported on windows. I suspect that's a big part of your problem. I would try installing torch first separately. if that works, then you should be able to install allennlp afterward.

joseakamaru commented 5 years ago

I was able to determine the issue with the import Torch. I needed to install the package Cuda on my device, which then enables the installation of Torch. After installing Torch, I still have the same error prompt:

ERROR: Could not find a version that satisfies the requirement torch<1.2,>=0.4.1 (from allennlp) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch<1.2,>=0.4.1 (from allennlp)

Even though I have Torch (1.2.0) and torchvision (0.4.0) installed.

Jose Medina The University of Alabama at Birmingham Graduate School for Computer Engineering ( <%28813%29%20480-9750>205) 253 9350 jrmedina@uab.edu

On Mon, Sep 9, 2019 at 7:34 PM Joel Grus notifications@github.com wrote:

technically allennlp is not supported on windows. I suspect that's a big part of your problem. I would try installing torch first separately. if that works, then you should be able to install allennlp afterward.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/allenai/allennlp/issues/3232?email_source=notifications&email_token=AJCR4X7CPZYDNGK4LZYM243QI3TPTA5CNFSM4IVBN4GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6JNZ5A#issuecomment-529718516, or mute the thread https://github.com/notifications/unsubscribe-auth/AJCR4X24RZOEMJ6DKCVQFSLQI3TPTANCNFSM4IVBN4GA .

joelgrus commented 5 years ago

the pip-installable version of allennlp doesn't work with pytorch 1.2. (you can see it wants bounds torch<1.2,>=0.4.1) you need to use e.g. 1.1.

the next release of allennlp will work with pytorch 1.2

joseakamaru commented 5 years ago

Thanks! That helped a lot

Jose Medina University of Alabama at Birmingham Graduate School for Computer Engineering ( <%28813%29%20480-9750>205) 253 9350 jrmedina@uab.edu

On Mon, Sep 9, 2019 at 9:40 PM Joel Grus notifications@github.com wrote:

the pip-installable version of allennlp doesn't work with pytorch 1.2. (you can see it wants bounds torch<1.2,>=0.4.1) you need to use e.g. 1.1.

the next release of allennlp will work with pytorch 1.2

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/allenai/allennlp/issues/3232?email_source=notifications&email_token=AJCR4X3RDRS22MPBAG4EK33QI4CJZA5CNFSM4IVBN4GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6JUBEQ#issuecomment-529744018, or mute the thread https://github.com/notifications/unsubscribe-auth/AJCR4X26RQMBYLOYDYHFY2LQI4CJZANCNFSM4IVBN4GA .