Fastai v1 install issues thread

(Stas Bekman) #63

You did the right thing by asking here, @dhoa, it was us developers, who broke it for you.

In the future, remember, that an even simpler solution is to just make a new clone of the repo :wink: in which case no git understanding is needed at all.

(Jeremy Howard (Admin)) #64

That’s pretty much how I fix any git issues. I think @sgugger is the same. :slight_smile:


Don’t be mean, I didn’t have to do this for at least ten days :wink: My new personal record ^^

(Dien Hoa TRUONG) #66

This is exactly what I did :smiley: so I don’t heart my head to much. But I want to become a good developper like you guys also, so I ask it anyway, to have something to learn when I have time

This forum give me a very comfortable feeling when I ask question. Nobody judge anyone by asking a simple question, and the admin doesn’t let this happen also. We share with each other even some tips that I think rarely found in other places. Perfect environment to learn ! I’m very happy to be part of it.

(Brian Holland) #67

I’m so freaking glad to see that I’m not the only one who gets in a git bind sometimes.

(Alex Tat-Sang Choy) #68

My OS is macOS 10.13.6. Strangely, I just copy and paste your steps above to create a new environment, but never seen fastai-py3.6 in the available kernels.

(Stas Bekman) #69

It just calls it python3. Why do you expect it to be called fastai-py3.6?

jupyter kernelspec list
Available kernels:
  python3    /home/stas/anaconda3/envs/fastai-py3.6/share/jupyter/kernels/python3

and in another conda env it’s called the same, but the location is different:

 jupyter kernelspec list
Available kernels:
  python3    /home/stas/anaconda3/envs/pytorch-dev/share/jupyter/kernels/python3

did following my script work for you? did you get the kernel w/o needing to do anything extra?

(Hasib Zunair) #70

Will the deep learning part 1 course notes work with v1?

(Stas Bekman) #71

it will not. New part one will be happening shortly and that one will.

(Hasib Zunair) #72

okay, thanks

(Stas Bekman) #73

Wiki mode has been turned on for the first post so you can edit it to improve it. Thank you.


I updated my fastai v1 library from the github repo just now (previously updated last night and working fine). Now, when I try to call image_data_from_csv, I am told it is not defined:

from fastai import *
from import *

data = image_data_from_csv(...)
NameError                                 Traceback (most recent call last)
<ipython-input-15-d7d8b5020c48> in <module>()
----> 1 data = image_data_from_csv('/root', 
      2     folder='1FhbiyAFNKcIbhL',
      3     test='/root/1FhbiyAFNKcIbhL-test',
      4     csv_labels='T1Mapped.' + trait + '.2col.tsv',
      5     ds_tfms=get_transforms(do_flip=False),

NameError: name 'image_data_from_csv' is not defined

Did the imports get rearranged in the nightly update?


There has been a changed of API as mentioned here. Look at the examples or the docs for more information.


Thanks. Now I am loading ImageDataBunch.from_csv(...) but I wonder if there has been a regression with the front slash / path / division issue:

TypeError                                 Traceback (most recent call last)
<ipython-input-21-4ca507aa97d0> in <module>()
      5     ds_tfms=get_transforms(do_flip=False),
      6     bs=128, # Need larger batch size for rarer things (or balance them artificially)
----> 7     size=128)

/app/fastai/fastai/vision/ in from_csv(cls, path, folder, sep, csv_labels, valid_pct, fn_col, label_col, test, suffix, header, **kwargs)
    301             header:Optional[Union[int,str]]='infer', **kwargs:Any)->'ImageDataBunch':
    302         "Create from a csv file."
--> 303         df = pd.read_csv(path/csv_labels, header=header)
    304         return cls.from_df(path, df, folder=folder, sep=sep, valid_pct=valid_pct, test=test,
    305                 fn_col=fn_col, label_col=label_col, suffix=suffix, header=header, **kwargs)

TypeError: unsupported operand type(s) for /: 'str' and 'str'


Pass a Path object (by calling Path(path)) for now, we’ll add it there soon. Thanks for warning us!


Perfect - that worked like a charm. Thank you!

(Jeremy Howard (Admin)) #79

Fixed in master. (Dunno who broke it. It really doesn’t matter. Right?)

(Stas Bekman) #80

Looks like there is an issue with spacy’s conda package dependencies, to get the newly released fastai-1.0.6 with conda working, I had to:

conda uninstall cymem spacy

and then:

conda install fastai -c fastai

It’s possible that the issue is only mine, since I was installing various versions of cymem a few days ago, trying to fix spacy's faulty 2.0.15 release. So perhaps it doesn’t affect anybody else. But the deps are still wrong.

I filed an issue here:

edit: the outcome of the issue - for the foreseeable future, until cymem-2 is released on conda, don’t mix pip and conda in the same environment when installing fastai due its dependency on spacy.

(Thomas) #81

I had the same problem with spacy,.

(Sylvain Le Groux) #82

Hi I’m having issues running jupyter notebook after installing fastai library on Ubuntu 18.04
Following previous instructions I created a separate conda env and installed packages as such (with cuda9.1):

conda create -y  python=3.6 --name fastai-py3.6
conda activate fastai-py3.6
conda install -y conda
conda install -y pip setuptools
conda install -y -c pytorch pytorch-nightly cuda91
conda install -y -c fastai torchvision-nightly
conda install -y -c fastai fastai
conda uninstall -y fastai
pip install -e .[dev]

I then activated my env and tried to run jupyter:

source activate  fastai-py3.6
jupyter notebook

which raised the following errors:

Traceback (most recent call last):
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/site-packages/traitlets/", line 528, in get
    value = obj._trait_values[]
KeyError: 'allow_remote_access'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/site-packages/notebook/", line 869, in _default_allow_remote
    addr = ipaddress.ip_address(self.ip)
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/", line 54, in ip_address
ValueError: '' does not appear to be an IPv4 or IPv6 address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/workfit/anaconda3/envs/fastai-py3.6/bin/jupyter-notebook", line 11, in <module>
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/site-packages/jupyter_core/", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/site-packages/traitlets/config/", line 657, in launch_instance
  File "<decorator-gen-7>", line 2, in initialize
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/site-packages/traitlets/config/", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/site-packages/notebook/", line 1629, in initialize
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/site-packages/notebook/", line 1379, in init_webapp
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/site-packages/notebook/", line 158, in __init__
    default_url, settings_overrides, jinja_env_options)
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/site-packages/notebook/", line 251, in init_settings
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/site-packages/traitlets/", line 556, in __get__
    return self.get(obj, cls)
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/site-packages/traitlets/", line 535, in get
    value = self._validate(obj, dynamic_default())
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/site-packages/notebook/", line 872, in _default_allow_remote
    for info in socket.getaddrinfo(self.ip, self.port, 0, socket.SOCK_STREAM):
  File "/home/workfit/anaconda3/envs/fastai-py3.6/lib/python3.6/", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

Any idea what’s going on?