Fastai (v2) install issues with pip

I’m trying to install fastai on our institutional compute cluster using pip and virtualenv.

I first tried installing it with python 3.8.0, but got an error message saying that python >= 3.6 & < 3.7 was needed. So I created a new virtualenv, loaded python 3.6.3, installed torch (pip install torch) and then tried pip install fastai.

But now I get a pandas version incompatibility error.

(fastai) [spai@beluga2 software]$ pip install fastai
Looking in links: /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/nix/avx512, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/nix/avx2, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/nix/generic, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic
Ignoring pip: markers 'python_version < "3"' don't match your environment
Collecting fastai
  Using cached fastai-2.0.8-py3-none-any.whl (353 kB)
Processing /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic/Pillow-7.2.0-cp38-cp38-linux_x86_64.whl
Requirement already satisfied: pip in /home/spai/.virtualenvs/fastai/lib/python3.8/site-packages (from fastai) (20.2.2)
Processing /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic/fastprogress-1.0.0-py3-none-any.whl
Processing /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic/spacy-2.2.2-cp38-cp38-linux_x86_64.whl
Processing /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic/scikit_learn-0.23.0-cp38-cp38-linux_x86_64.whl
Processing /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic/matplotlib-3.2.1-cp38-cp38-linux_x86_64.whl
Processing /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic/torchvision-0.7.0-cp38-cp38-linux_x86_64.whl
Collecting fastcore>=1.0.1
  Using cached fastcore-1.0.1-py3-none-any.whl (37 kB)
Processing /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic/requests-2.24.0-py2.py3-none-any.whl
Processing /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/nix/generic/scipy-1.4.1-cp38-cp38-linux_x86_64.whl
ERROR: Could not find a version that satisfies the requirement pandas>=1.1.0 (from fastai) (from versions: 0.25.3, 1.0.3, 1.0.5)
ERROR: No matching distribution found for pandas>=1.1.0 (from fastai)

How do I get around this?
Thanks!
Shraddha

hey,

as you can see, the error is not directly related to fastai - you need to update your version of pandas. It should be as easy as something like pip install -U pandas. In general, fastai has installation instructions on the Github page - if you keep running into errors, it might be best to just start a new env and follow those.

Hello,
Thanks for the feedback.
I have indeed been following the instructions on github. https://github.com/fastai/fastai

Running pip install -U pandas didn’t resolve the problem.

The error message seems to suggest that pandas 1.1.0 doesn’t work with fastai (from fastai). I need to understand what the incompatibility is that fastai has with my dependencies, so I can resolve these.

ERROR: Could not find a version that satisfies the requirement pandas>=1.1.0 (from fastai) (from versions: 0.25.3, 1.0.3, 1.0.5)
ERROR: No matching distribution found for pandas>=1.1.0 (from fastai)

Any info would be great.

Shraddha

hey Shraddha,

as far as I understand, the error is saying that pip cannot find the right version of Pandas, which is odd (assuming you are on Linux, which I believe is the only OS fully compatible with fastai out of the box).

Therefore I suggest you do a clean install as suggested on the Github page: install miniconda, and then run conda install -c fastai -c pytorch fastai. If you are still running into issues, then please post the full specs of your machine and any errors you encounter.