I have fresh installation of Ubuntu 18.04. and I want install latest fastai. So currently v 1.0.39
Here are my steps:
Download latest conda. Currently Anaconda3-2018.12-Linux-x86_64.sh
Open terminal
command: $ bash Anaconda3-2018.12-Linux-x86_64.sh (installed successfully with no errors)
command: $ sudo apt install nvidia-390 (installed successfully with no errors)
Reboot system!
Open terminal again and run this commands: $ conda create -n fastai python=3.7 (created with no errors) $ conda activate fastai $ conda install pytorch torchvision -c pytorch (installed successfully with no errors) $ conda install -c fastai fastai (version 1.0.39 is installed successfully with no errors)
Reboot system!
Terminal again and: $ conda activate fastai $ jupyter notebook
This automatically open new browser window with jupyter notebook and until now everything looks correct.
But when I try ran:
from fastai import *
from fastai.vision import *
from fastai.docs import *
import torch
I have this error:
ModuleNotFoundError: No module named ‘fastai.vision’
So it is looks like I’m runnig v0.7 or something.
Any idea what I’m doing wrong and how can I fix it?
I already tried few other similar way how to install latest fastai including pip but I have still same result
ModuleNotFoundError: No module named ‘fastai.vision’
In a PR request, I pulled the latest developer version of fastai the following commands in a clean environment. I then had two problems which I think I solved, but want to post here so others know what to do if they see this.
I was able to reproduce this problem following your instructions. Mine was installed via conda and had no such problems.
So as you identified pip installs incompatible versions of some of the numpy functionality and bottleneck, conda’s versions of these packages don’t have that problem. The problem happens during pandas’ import.
It looks like a new long overdue release is being tested: https://github.com/kwgoodman/bottleneck/issues/191, so perhaps let’s wait a little bit and perhaps it’ll get resolved automatically with the new release.
If, however, it gets delayed and/or new numpy is still not released, we will pin pip to bottleneck=1.2.0 for the next fastai release.
As you can see from the bug report, I managed to reduce the problem to:
python -c "import pandas"
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
Forgive the noob question here, but I am purposely working under 1.0.36.post1. I am using bash-git-prompt. When I am in the fastai folder, I am able to confirm I am using version 1.0.36.post1. When create a new folder for Kaggle competitions within the fastai folder, and then cd into the Kaggle folder, I check the version and now see that I am using 1.0.40.
All of this is done within a virtual environment. Any ideas on how I can make sure I am still under 1.0.36.post1? Apologies if I am supposed to be asking this question under a different thread than this one.
Use locate fastai/data_block.py if you’re on unix to find all the instances and then you will see if you have it installed twice. You probably have some symlinks pointing to a second install or something similar. Can’t tell without a proper report.
p.s. if you’re working with the git checkout, there was originally also a git cross-over in the 1.0.36 branch (with master HEAD) that has been fixed since then, so if you’re using the 1.0.36 branch, you need to update it.
I am having trouble upgrading to the latest version of fastai on Windows 10 using conda. I haven’t been able to update since 1.0.38. Running conda update fastai returns “all packages already installed”, even though there have been several new versions.
The only thing I can see is that at version 1.0.39, the build changed from py_1 to 1. Could this be causing the issue? I tried removing fastai and reinstalling, but it just installed 1.0.38 again. Specifying the latest version explicitly doesn’t work either.
Here’s the output of conda search fastai. The new versions are there, but it won’t install.
Name Version Build Channel
fastai 1.0.37 py_1 fastai
fastai 1.0.38 py_1 fastai
fastai 1.0.39 1 fastai
fastai 1.0.40 1 fastai
fastai 1.0.41 1 fastai
fastai 1.0.42 1 fastai
fastai doesn’t install dataclasses for py37, but it’s needed for py36. Most likely what happened is that you installed fastai with py37, but then some other package downgraded python to py36 and you’re running fastai with py36, while you installed it with py37?
It’d help if you were to follow the guideliness for support: https://docs.fast.ai/support.html
You’re not saying when you encountered the error. Please put yourself in the shoes of the person that has no idea what you did and then you will know what information to share
we currently don’t use conda-forge and all package dependencies are tested against the anaconda channel, so it’s possible that something is off in your case, since you’re on the fringe. But again I have no way of telling.
sorry I missed to clarify the python version. I installed python 3.6 after the conda installation (So what you wrote is not true for my case). Then I install fastai via conda -c pytorch -c fastai fastai.
The error of No module named 'dataclasses' occurred after I ran the cell of from fastai.tabular import *.
I created the environment on nvidia-docker. There, I used anaconda to follow the instruction on the github repo as possible.
Thank you for providing these details, @crcrpar. Indeed there was a bug in the conda package setup for py36, should be resolved in fastai-1.0.43 when that is released. Until then, please add conda install dataclasses to your docker build script.
yeah, conda is not very flexible in this situation. pip allows defining a dynamic package dependency which gets sorted out during install. conda only during package build and then it’s set in stone. So the variant is only doable if py36 and py37 packages are built. Since fastai is noarch, this variant unfortunately doesn’t work. But luckily no harm in reinstalling dataclasses for py37, so all is good.
Hi,
I get the following error:
DistributionNotFound: The ‘fastprogress>=0.1.18’ distribution was not found and is required by the application
when running
from fastai.vision import *
or other import operations in an Jupyter Notebook.
It runs fine when running it just in python.
I installed it through pip
fastai 1.0.42
fastprogress 0.1.18
Python version
3.6.3 (default, Sep 2 2018, 00:38:05)
I am running Ubuntu 16.04.
I should also note that this might be related to my pyenv setup, which I am using. However, I have not had any problems with the pyenv-jupyter combination so far.