简体   繁体   中英

Getting error while installing Flair (NLP Library)

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

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

I solved it by installing the following packages :

!pip install tiny-tokenizer flair

在此处输入图片说明

I was getting the same error.

Below steps worked for me on Windows10,Python3.6

1.Installing Pytorch by following the official installation instructions from https://pytorch.org The have well documented details.

Based on your selection of package [pip/conda etc] and OS [Mac/Linus/Windows] it will provide command . This link provides useful details on how to install pytorch - how to install pytorch

2.After successful installation of pytorch,just install Flair using command pip install flair

Upgrade your pip and try again.

pip install --upgrade pip
pip install torch

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM