-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fastai applications import error: No module named 'fastai.learner' #1
Comments
What (s)he said. |
any fix? |
use the conda environment in the original notebook. then import the environment into your project then it works perfectly |
Can you clarify on how you did this? It seems that this code was built using an older version of fastai. I tried using 0.7 but am running into issues. |
@StevenGin |
The last commit to this repo was ~2 years ago, so if one checks fastai's repo, one finds a release from 2 years ago 0.70.0 that has fastai.learner. Some subsequent prodding around suggests you can use the following: pip install fastai==0.7.0
pip install torch==1.3.0
pip install torchtext==0.3.1
pip install torchvision==0.4.1
pip install dill==0.3.1.1 Then if you have a Cuda chip attached to your host (the pretrained models were created on Cuda chips) you can:
|
I found the following versions work for me: |
I used these steps, and error got resolved for me: Open terminal Navigate to anaconda3 update conda Navigate to conda env section and create new environment named fastai make fastai environment as current working directory clone github repository of course-v3 make course-v3 as current working dir open jupyter notebook Click New->Terminal in Jupyter, then type: |
Thank you very much.
…------------------
刘佳玥
北京邮电大学/本科生/计算机学院
18801266513
北京
------------------ Original ------------------
From: "Vastav07"<[email protected]>;
Date: Fri, Aug 28, 2020 05:38 PM
To: "mcleavey/musical-neural-net"<[email protected]>;
Cc: "Jiayue Liu"<[email protected]>; "Comment"<[email protected]>;
Subject: Re: [mcleavey/musical-neural-net] fastai applications import error: No module named 'fastai.learner' (#1)
I used these steps, and error got resolved for me:
Open terminal
Navigate to anaconda3
cd anaconda3
update conda
conda update conda
Navigate to conda env section and create new environment named fastai
cd envs
conda create --name fastai
make fastai environment as current working directory
cd fastai
clone github repository of course-v3
git clone https://github.com/fastai/course-v3.git
make course-v3 as current working dir
cd course-v3
open jupyter notebook
jupyter notebook
Click New->Terminal in Jupyter, then type:
conda install -c fastai fastai
this step will install all required libraries.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I get the error "No module named fastai.learner" when I run:
!python generate.py -model notewise_generator -output notewise_generator_samples --random_freq .8 --trunc 3
in BasicIntro.ipynb.
The error occurs for all the fastai applications that you import:
from fastai.learner import *
from fastai.rnn_reg import *
from fastai.rnn_train import *
from fastai.nlp import *
from fastai.lm_rnn import *
Also the way fastai structure their modules (http://docs.fast.ai/index.html) seem to be different from what is used in this repo.
The text was updated successfully, but these errors were encountered: