Is there a quick line of code I can use that would verify the loaded fast ai version is what is expected? ala similar to python v3 check:
if sys.version_info.major < 3:
raise Exception(“Must use Python 3”)
After flipping back and forth with .7 and 1.0 on different machines, it made me think this would be very helpful as first check to run to make sure the machine/environment is configed as expected rather than try and debug something non-obvious due to running a diff version of fastai than expected.
import fastai; fastai.__version__
is probably going to return what you want.
Thanks very much! That’s what I needed.
Note that for .7, it fails with:
module ‘fastai’ has no attribute ‘ version’
but works as expected on 1.0.
Regardless, it’s a quick safety check to implement going forward, so thanks again.
AttributeError: module ‘fastai’ has no attribute ‘
then …how to check with .7 ?
The error itself, is the best indicator/check you are on .7
This version feature I believe was only added for 1.0 and higher, so going forward you should always have a ready check.
just now i found a way to see the .7 version if u installed it by pip previously, just use " pip list"
I am trying to run the first lesson and I installed fastai in my fastai environment using
conda install -c pytorch -c fastai fastai
I am getting a couple of errors like
ModuleNotFoundError: No module named ‘fastai.vision’
I want to understand my fastai version - I did this based on the answer in this thread.
import fastai; fastai.
module ‘fastai’ has no attribute ‘ version ’
I am reasonably sure of my fastai version is 1.0.61. I can confirm this because i see it in two places inside my fastai environment
conda list fastai --> 1.0.61
In Jupyter notebooks -> installed -> fastai is showing as 1.0.61
Then why do i get the error above ? Any help appreciated. Thanks.
You are missing the
double underscores, at the beginning and the end of