ERROR: No matching distribution found for torch>=1.7.0 (from fastai>=2.1->fastbook)

In 02_production.ipynb
Running this code from cell 1 :

!pip install -Uqq fastbook
import fastbook
fastbook.setup_book()

Produces this error
ERROR: Could not find a version that satisfies the requirement torch>=1.7.0 (from fastai>=2.1->fastbook) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch>=1.7.0 (from fastai>=2.1->fastbook)

Does any one have any suggestions about what should be done to resolve this?. Strangely the next cell works correctly.
from fastbook import *
from fastai.vision.widgets import *

Thanks. Inayat

Hi @Inayat,

I am using Gradient and the versions (that are working) there are :
fastai version : 2.0.11
torch version : 1.6.0

You should try it out !

Charles

Thanks for the nudge Charles
Solution for on premise server is in anaconda prompt run :

conda update fastai -c fastai -c pytorch

This updates many libraries so that
pytorch is 1.7.0
fastai is 2.1.4

Below is the full list of inserts, updates and deletes.

package | build
---------------------------|-----------------
attrs-20.3.0 | pyhd3eb1b0_0 43 KB
bleach-3.2.1 | py_0 112 KB
cffi-1.14.3 | py38h7a1dbc1_0 223 KB
colorama-0.4.4 | py_0 18 KB
cryptography-3.1.1 | py38h7a1dbc1_0 528 KB
cudatoolkit-11.0.221 | h74a9793_0 627.0 MB
fastai-2.1.4 | py_0 145 KB fastai
fastcore-1.3.2 | py_0 43 KB fastai
fastprogress-1.0.0 | pyh39e3cac_0 17 KB fastai
freetype-2.10.4 | hd328e21_0 466 KB
importlib-metadata-2.0.0 | py_1 35 KB
importlib_metadata-2.0.0 | 1 11 KB
intel-openmp-2020.2 | 254 1.6 MB
ipython-7.19.0 | py38hd4e2768_0 998 KB
joblib-0.17.0 | py_0 206 KB
jupyter_client-6.1.7 | py_0 77 KB
kiwisolver-1.3.0 | py38hd77b12b_0 78 KB
libuv-1.40.0 | he774522_0 255 KB
lz4-c-1.9.2 | hf4a77e7_3 106 KB
matplotlib-3.3.2 | 0 25 KB
matplotlib-base-3.3.2 | py38hba9282a_0 5.1 MB
mkl-2020.2 | 256 109.3 MB
mkl_fft-1.2.0 | py38h45dec08_0 122 KB
nb_conda-2.2.1 | py38_1 34 KB
nb_conda_kernels-2.3.0 | py38_0 26 KB
nbdev-1.1.5 | py_0 46 KB fastai
nbformat-5.0.8 | py_0 88 KB
ninja-1.10.1 | py38h7ef1ec2_0 249 KB
numpy-1.19.2 | py38hadc3359_0 22 KB
numpy-base-1.19.2 | py38ha3acd2a_0 3.8 MB
pandas-1.1.3 | py38ha925a31_0 7.5 MB
pandoc-2.11 | h9490d1a_0 14.4 MB
pillow-8.0.1 | py38h4fa10fc_0 690 KB
pip-20.2.4 | py38haa95532_0 1.8 MB
prompt-toolkit-3.0.8 | py_0 248 KB
pygments-2.7.2 | pyhd3eb1b0_0 674 KB
pyrsistent-0.17.3 | py38he774522_0 92 KB
python-3.8.5 | h5fd99cc_1 15.7 MB
python-graphviz-0.14.2 | py_0 20 KB
python_abi-3.8 | 1_cp38 4 KB fastai
pytorch-1.7.0 |py3.8_cuda110_cudnn8_0 1003.4 MB pytorch
pyzmq-19.0.2 | py38ha925a31_1 400 KB
scikit-learn-0.23.2 | py38h47e9c7a_0 4.7 MB
scipy-1.5.2 | py38h14eb087_0 11.9 MB
setuptools-50.3.1 | py38haa95532_1 730 KB
spacy-2.3.2 | py38h74a9793_0 4.0 MB
sqlite-3.33.0 | h2a8f88b_0 809 KB
terminado-0.9.1 | py38_0 27 KB
torchvision-0.8.1 | py38_cu110 7.2 MB pytorch
tqdm-4.50.2 | py_0 56 KB
typing_extensions-3.7.4.3 | py_0 28 KB
urllib3-1.25.11 | py_0 99 KB
wasabi-0.8.0 | py_0 22 KB
wheel-0.35.1 | py_0 37 KB
zeromq-4.3.2 | ha925a31_3 4.1 MB
zipp-3.4.0 | pyhd3eb1b0_0 15 KB
------------------------------------------------------------
Total: 1.79 GB

The following NEW packages will be INSTALLED:

libuv pkgs/main/win-64::libuv-1.40.0-he774522_0
nb_conda pkgs/main/win-64::nb_conda-2.2.1-py38_1
nb_conda_kernels pkgs/main/win-64::nb_conda_kernels-2.3.0-py38_0
typing_extensions pkgs/main/noarch::typing_extensions-3.7.4.3-py_0

The following packages will be REMOVED:

beautifulsoup4-4.9.1-py38_0
bottleneck-1.3.2-py38h2a96729_1
dataclasses-0.7-py38_0
fastscript-1.0.0-pyh39e3cac_0
numexpr-2.7.1-py38h25d0782_0
nvidia-ml-py3-7.352.0-py_0
soupsieve-2.0.1-py_0

Hi, I’m getting the same error while trying to install fastbook, but suggested solution didn’t work for me.
“conda update fastai -c fastai -c pytorch” gives me:
PackageNotInstalledError: Package is not installed in prefix.
prefix: C:\Users\Admin\anaconda3
package name: fastai

I also tried to install torch manually (like some other posts in internet suggest), but again no result.
Feel a little bit frustrated…
Does anyone know how to fix that?
Thanks in advance

After rebooting pc it started to work)
(probably it was required to complete torch installation)