Getting error while installing Flair (NLP Library)

2019-08-31 05:23发布

问题:

I am trying to install NLP library "Flair" using pip and getting the error message:

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

What should I do

I am using python3.6 and tried to install flair using cmd and pip in virtualenv. But there is still error messages.

(env) C:\Users\HP>pip install flair

I want the installation without any issue.enter image description here

回答1:

Pytorch or torch is currently cannot be installed using pypi in windows. You will need conda to accomplish that:

conda install pytorch torchvision cudatoolkit=9.0 -c pytorch

OR

for older torch version you can use whl file, Cuda version can be 8.0,9.0,10.0

pip install torch==1.0.1 -f https://download.pytorch.org/whl/cu90/stable # CUDA 9.0 build