Sorry, I posted too early. The above didn’t quite do it for me. Now I am getting a different one:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-8-78a5dc88e87d> in <module>
----> 1 from fastai2.vision.core import *
/fastai2/fastai_dev/fastai2/vision/core.py in <module>
9 from ..test import *
10 from ..torch_basics import *
---> 11 from ..data.all import *
12
13 from PIL import Image
ModuleNotFoundError: No module named 'fastai2.data'
fastai2 is searching for the python fastai2.data module, which, I believe, used to be there in a former version.
Now, in version 2.0.1 of fastai2 there is no fastai2.data folder (I checked on the os level).
I haven’t quite figured it out yet and will post again when I have.
The docs and nbs btw still assume fastai2.data to be there. Where did the data directory go?
Here’s the link to the fastai2 repo on Github (just to help others who get to this point). The readme file contains installation instructions…
but I have a question. For both fastai v1 and v2, the install instructions recommend using pip to get the development version of the code. However, I’m using conda and I really like having separate environments for things. The fastai_v1 development install instructions say:
We don’t recommend using this approach [using conda ‘develop’] because it doesn’t play well with conda’s normal installs (a normal conda package install will supersede the editable install at run time). Unlike pip, conda’s normal packages are oblivious of their editable versions and vice versa - so you end up with having both and only one working. Moreover, conda doesn’t support extra dependencies implemented by pip ( dev dependencies).
It seems that pip -e just puts an “egg” file with a bunch of links into your filepath. Is it possible to create a new conda environment for fastai2 once you have used pip to do a development install (pip install -e)?
I can confirm that worked. The correct installation instructions are the latest ones from the ReadMe.md, not the ones I gave above. Installing nbdev explicitely is not needed either.
import torch
from fastai2 import __version__
print(torch.__version__)
print(__version__)
1.3.1
0.0.4
My office proxy works fine with conda/mamba and git, but doesn’t trust pip for some reason. I’ve set up the global and added trusted sites and every hot tip I could find on stackoverflow, but no joy. Gave up trying to fix pip a long time ago, and recent efforts to try again for fastai2 were not getting any further.
I was finally able to install fastai2 without proxy issues, but it took multiple steps. Documenting here for anyone else finding themselves in this curious boat.
Today, I totally reinstalled anaconda (on windows) and updated all libs. After that I installed conda version of pytorch 1.3.1 and I check its there working… When I try to install fastai2 as given below I get error…
PS: I do have only root env.