Do you have any plan for making the package installable with conda?
Not until it’s fully ready to be released, but when it’s time, it will be installed with conda install fastai
.
So new repo is ready and here. Normally, you can follow the installation instructions there and it should work but I have only tested locally so please tell me if there is a problem.
For the github install:
pip install git+https://github.com/fastai/fastai2
For the local install:
pip install -e .
inside the cloned repo.
If you are just cloning this repo before contributing, don’t forget to run
tools/run-after-git-clone
@MichaelScofield I had an uncommited file in fastai_dev which I think was the reason for your problem (sorry about that).
Hi @sgugger,
I tried to install the new repo and got this error when do from fastai2.basics import *
I tried both pip install nbdev
and pip install git+https://github.com/fastai/nbdev
but did not solve the issue.
Please have a look when you can. Thank you.
You can just do pip install nbdev
, that module is now on pypi.
As I mentioned, I did, but even import nbdev
failed.
I’ll take a look
It works for me locally, but not in colab. Which are you doing?
Hi Jeremy,
I’m working on Colab.
In colab this works for me:
!git clone https://github.com/fastai/nbdev.git
!cd nbdev && pip install -e .
Something odd going on in colab. pip install nbdev
also works fine locally, but not in colab.
I’m not seeing this issue, I was able to install both and do from fastai2.basics import *
!pip install torch torchvision feather-format kornia pyarrow Pillow wandb --upgrade
!pip install git+https://github.com/fastai/fastai2
!pip install nbdev
(however import nbdev
does fail)
Were you able to run any piece of code after that? untar_data
for example
Yes. untar_data
worked.
I see now what you mean by it won’t install. So I can still use the library (I think sgugger did something to temporarily let us do this) but investigating where the pip
packages are I just have a nbdev-0.0.2.dist-info
folder
From what I’m reading I think it needs a __init__
file? (edit looks like Jeremy already spotted that just before my post )
After a few test (had to, so not to make confirmation of a fake success), Jeremy’s workaround solved it, now import works fine in Colab. Thank you all for the great support.
nbdev
is now fixed on pypi for Colab. So you can just pip install nbdev
Hello, I was doing the fastai2 code walkthrough, but things broke after the recent nbdev refactoring. Alas, I’m not a Python expert (yet). Can someone help me to figure out what is going wrong and how to fix it?
from nbdev.showdoc import *
AssertionErrorTraceback (most recent call last)
in
----> 1 from nbdev.showdoc import *
/dl/fastai_dev/dev/nbdev/showdoc.py in
6 #Cell
7 from .imports import *
----> 8 from .export import *
9 from .sync import *
10 from IPython.display import Markdown,display
/dl/fastai_dev/dev/nbdev/export.py in
199 #Cell
200 #Catches any from nbdev.bla import something and catches nbdev.bla in group 1, the imported thing(s) in group 2.
–> 201 _re_import = re.compile(r’^(\s*)from (’ + Config().lib_name + ‘.\S*) import (.*)$’)
202
203 #Cell
/dl/fastai_dev/dev/nbdev/imports.py in init(self, cfg_name)
26 while cfg_path != Path(’/’) and not (cfg_path/cfg_name).exists(): cfg_path = cfg_path.parent
27 self.config_file = cfg_path/cfg_name
—> 28 assert self.config_file.exists(), “UseConfig.create
to create aConfig
object the first time”
29 self.d = read_config_file(self.config_file)[‘DEFAULT’]
30
AssertionError: UseConfig.create
to create aConfig
object the first time
This line can’t work if you aren’t in the fastai2 folder, where there is a config file.
I was running the dl/fastai_dev/dev/01_core_foundation notebook, so I am in the dev folder. Which config file is it looking for?
fastai_dev
doesn’t work with nbdev, you should be in the fastai2
repo now.