Fastai v1 install issues thread

Not intentionally, no.

It’s difficult to help when you don’t provide any details about how you were trying to install things. Please refer to https://docs.fast.ai/support.html and most importantly share which exact commands you were issuing and which platform you’re on.

My guess is that you’re installing with conda and you’re hitting this issue:
https://docs.fast.ai/troubleshoot.html#cant-install-the-latest-fastai-conda-package

Do you get this problem if you start with a fresh conda environment?

Thanks for reply.

I have linux with Anaconda3-2018.12-Linux, python-3.7.1-h0371630_7
First I have installed by

conda install pytorch-cpu torchvision-cpu -c pytorch

Which installed
torchvision-cpu-0.2.2 py_3
pytorch-cpu-1.0.1 py3.7_cpu_2
conda-4.6.8 py37_0
ninja-1.8.2

conda install -c fastai fastai
which installed fastai-1.0.34

next I have installed
conda install -c fastai fastai=1.0.48

Which installed
pytorch pkgs/main/linux-64::pytorch-1.0.1-cuda100py36he554f03_0

and updated
fastai-1.0.48
and removed
pytorch-cpu-1.0.1-py3.7_cpu_2
torchvision-cpu-0.2.2-py_3

Looks like new version of fastai has dependency on pytorch with cuda

Thank you for the details, @abicz.

You don’t need to install pytorch-cpu any longer, you install just the normal pytorch and it works w/ or w/o GPU. I will tweak README to make it more explicit.

But you can if you want to. Please see: https://docs.fast.ai/install.html#cpu-build

I just did:

conda create -y python=3.7 --name fastai-cpu
conda activate fastai-cpu
conda install -y conda
conda install -y -c pytorch pytorch-cpu torchvision
conda install -y -c fastai fastai

and it installed the latest fastai.

Is torchvision-cpu really needed? But I tried using it instead of non-cpu package and it also installed just fine.

Perhaps your conda client is old and needs updating?

Thank you @stas it is working fine now. Possible it was problem with old version of conda.

1 Like

PyPI installation failed on Jetson Xavier. Is there an installation instruction for Arm processors like aarch64?

I have never heard of anybody trying anything besides win, linux and osx. Can you even install pytorch on aarch64?

fastai shouldn’t have a problem installing on any platform, since it’s just pure python. The binary dependencies are the issue. If they are supported then fastai will work, if they aren’t then not.

In any case it is the worst possible way to ask for help by saying something failed - you need to give us at least some rope - traceback in this case. Unless you’re just asking whether something is supported, which is not what you’re asking for.

Thanks for your reply. Yes, my question was not very clear.

What I run: pip install fastai

The error I get:
Could not find a version that satisfies the requirement torch>=1.0.0 (from fastai) (from versions: 0.1.2, 0.1.2.post1)
No matching distribution found for torch>=1.0.0 (from fastai)

Hardware = Jetson AGX Xavier
OS = Ubuntu 18.04

As for Pytorch, people in NVIDIA built this version for Jetson Xavier which I installed and then ran some tutorials without a problem.

As you said, fastai should not have a problem with any platform however it has many dependencies which some are not easy to install on an (Arm processor). For example, it was not that straight forward to install Pillow. That’s why I am asking if an installation instruction exists for this type of hardware.

That’s much better. Thank you.

You don’t need to rely on the fastai automatic dependencies if you can arrange for them yourself. Please see:
https://docs.fast.ai/install.html#custom-dependencies

As you said, fastai should not have a problem with any platform however it has many dependencies which some are not easy to install on an (Arm processor). For example, it was not that straight forward to install Pillow. That’s why I am asking if an installation instruction exists for this type of hardware.

I have a feeling you will be the one to write them for that arch. Nobody has ever asked for this arch until now.

Please feel free to ask for specifics if you get stuck.

I have tried installing fastai and when I launch the Jupyter notebook, I keep getting the error:

Previously, I ran the following commands:

OS = MacOS

source activate py36
sudo conda install -c fastai fastai

Output of which python3.6
/anaconda3/envs/py36/bin/python3.6

Output of which python3.5
python3.5 not found

Then, when I launch the jupyter notebook from terminal:

  File "/anaconda3/lib/python3.6/site-packages/tornado/web.py", line 1512, in _execute
    result = yield result
  File "/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/anaconda3/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "/anaconda3/lib/python3.6/site-packages/notebook/services/sessions/handlers.py", line 73, in post
    type=mtype))
  File "/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/anaconda3/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "/anaconda3/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/anaconda3/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "/anaconda3/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/anaconda3/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 307, in wrapper
    yielded = next(result)
  File "/anaconda3/lib/python3.6/site-packages/notebook/services/kernels/kernelmanager.py", line 148, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "/anaconda3/lib/python3.6/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "/anaconda3/lib/python3.6/site-packages/jupyter_client/manager.py", line 258, in start_kernel
    **kw)
  File "/anaconda3/lib/python3.6/site-packages/jupyter_client/manager.py", line 203, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "/anaconda3/lib/python3.6/site-packages/jupyter_client/launcher.py", line 128, in launch_kernel
    proc = Popen(cmd, **kwargs)
  File "/anaconda3/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/anaconda3/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/opt/python3/bin/python3.5': '/usr/local/opt/python3/bin/python3.5'

output of echo $PATH:

/anaconda3/envs/py36/bin:/anaconda3/bin:/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/anaconda3/envs/py36/bin:/Users/pramodsrinivasan/google-cloud-sdk/bin:/anaconda3/bin:/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin

check some earlier posts in this thread with the same issue, your ~/.jupyter has some old values that point to python-35. - you could just reset it (back up first).

sudo conda install -c fastai fastai

this is not correct, please see: https://github.com/fastai/fastai/blob/master/README.md#installation (but it’s unrelated to your error you’re reporting).

Hi All,

I am planning to create an AWS EC2 machine for building models. Is there an AMI or any other instructions?

I’ve taken a brief look around but didn’t find anything obvious.
My general plan is to create an P2 or P3 Ubuntu Machine and follow along the installation instructions.

Thanks

Matt

6 posts were merged into an existing topic: Improving/Expanding Functional Tests

Hi -

Is there a one line install for Fastai with graphics drivers like for TF on Ubuntu?

I just made a box with Ubuntu 18.04 LTS. and got my RTX 2060 working with $ sudo ubuntu-drivers autoinstall. Installing tensorflow with gfx support just requires one line:

conda create --name tf_gpu tensorflow-gpu

Is there a similar one-line conda install for fastai that loads in all required cuda support?

Edmund

conda create --name testme -c pytorch -c fastai fastai
conda activate testme
1 Like

Any recommendations on Ubuntu AMI images? Will the standard one work or do I need to get one customized for deep learning?

This is a fastai v1 installation issues thread. You probably want to open another thread if such doesn’t exist already to discuss specific platforms and their specific automation ways.

Yeah I found that too. Problem solved. Let’s leave this here for people searching.

Edmund

1 Like

I use PyTorch 1.0 on the AMD GPU, https://rocm.github.io/pytorch.html

How would I go about installing the fast.ai libraries on top of an existing PyTorch install built for AMD GPUs.

I just need a few pointers and I can hack thru the install scripts.

Thank you.

See: https://docs.fast.ai/install.html#custom-dependencies

Please report back if you manage to get it to work, @aurotripathy

Hello @stas.
Thank you for the link.
Applying the installation steps at the link, I was able to get thru the training portion of lesson 1.
I’ll report back again after a few more tests.

1 Like