snorkel-team / snorkel

A system for quickly generating training data with weak supervision
https://snorkel.org
Apache License 2.0
5.81k stars 857 forks source link

Torch install failure when using requirements.txt #1542

Closed drewbyh closed 4 years ago

drewbyh commented 4 years ago

Issue description

When running 'pip install -r requirements.txt' I get the following error on the Torch install:

ERROR: Could not find a version that satisfies the requirement torch<1.2.0,>=1.1.0 (from -r requirements.txt (line 21)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch<1.2.0,>=1.1.0 (from -r requirements.txt (line 21))

All installs before Torch are successful.

Code example/repro steps

ERROR: Could not find a version that satisfies the requirement torch<1.2.0,>=1.1.0 (from -r requirements.txt (line 21)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch<1.2.0,>=1.1.0 (from -r requirements.txt (line 21))

Expected behavior

Required Torch version should install correctly.

Screenshots

If applicable, add screenshots to help explain your problem. No screenshots of code!

System info

Additional context

Add any other context about the problem here.

stenpiren commented 4 years ago

I have exactly the same problem. Not just when installing from requirements.txt but a simply pip install snorkel falls with the same error code:

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

Also, the requirements.txt fail in most of the tutorials. Same error code.

MortenKP commented 4 years ago

I have the same problem as well.

MortenKP commented 4 years ago

Installing one of these before "pip install snorkel" solved it for me:

CUDA 9.0

conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch

CUDA 10.0

conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0 -c pytorch

CPU Only

conda install pytorch-cpu==1.1.0 torchvision-cpu==0.3.0 cpuonly -c pytorch

Source: https://pytorch.org/get-started/previous-versions/

henryre commented 4 years ago

Thanks for posting your solution @MortenKP ! We have a note on using conda with PyTorch in the README but feel free to propose a clearer description! Going to close this out, but feel free to re-open if needed!