Anyone able to run the Lesson 1 notebook?

You need to install opencv. There are other messages in this forum that explain how to fix it.

Note that the little magnifying glass in the top right is a ‘search’ button. If you search for ‘cv2’ you’ll find the solutions that @sanjeev.b is referring to.

I am still having issue getting past ‘cv2’ module issue. And I think there is also issue with the path. Suggestions would be appreciated. Thank you, Ben

Hi Jeremy. Thanks again and again for the course.

I was reading the lesson 1 notebook and I keep getting these errors:
from fastai.torch_imports import *
Traceback (most recent call last):
File “”, line 1, in
File “fastai/torch_imports.py”, line 24
if pre: load_model(m, f’wgts/{fn}.pth’)
i cloned the repo from fastai Github account.
any fix?

Thanks

You need to run with python 3.6… you have a lower version

I’ve updated Windows 10 Installation Notes to include Lesson1 install notes for both Windows and Linux. I’ve tested on Windows bash, not a host Linux system, but the commands appear to be universal for all platforms. YMMV.

1 Like

Here struggling to make it work in bash ubuntu, enviroment created with fastai.yml (under windows 10 pro WLS).

I get this error with fastai.imports, note that it is different from previously posted error message. Being an R programmer still not confident with Python don’t have any idea whats going on here. Luckily both Paperspace and Crestle run fine lesson1, so not that terrible.

Still, if someone can give a clue about this would be grateful:

Opencv is probably not available in your environment. Search forums on how to install opencv.

1 Like

You can’t run fastai on Windows - or at least, we’ve never tried it, and I very much doubt it works.

1 Like

Jeremy,
Im not under Windows but on Ubuntu (under Windows Linux Subsistem + bash ,just as explained in Workshop).

My take on Workshop instructions was:

  • not to use Windows based instalation
  • install with bash in linux windows environment. (this 2nd one I understood was ok)

Maybe also even option 2 is a loss of time/energy? (Will be ok if the answer to that is yes, to focus during the course just on AWS, Paperspace and Crestle that do work…)

Understood - but fastai lib is not supported there either and is very unlikely to work. What we did in the workshop was learn how to use our local PCs to practice with Jupyter notebook, not to use them with Pytorch, CUDA, or fastai. Sorry for not making that clear enough at the time.

CUDA doesn’t work on WSL at all, FYI.

2 Likes

Ok now its clear, thanks for answer, good news in fact, considering the workload ahead it means one problem less! :grinning:

Hi, I was using python 3.5 on Ubuntu machine but because of code formatting in ipython notebooks I installed anaconda with python3.6. Now I cant install few python packages (isoweek, pandas_summary, torchtext) from conda.

Command:

conda install isoweek

prints the following:

Fetching package metadata ...........

PackageNotFoundError: Packages missing in current channels:
            
  - isoweek

We have searched for the packages in the following channels:
            
  - https://repo.continuum.io/pkgs/main/linux-64
  - https://repo.continuum.io/pkgs/main/noarch
  - https://repo.continuum.io/pkgs/free/linux-64
  - https://repo.continuum.io/pkgs/free/noarch
  - https://repo.continuum.io/pkgs/r/linux-64
  - https://repo.continuum.io/pkgs/r/noarch
  - https://repo.continuum.io/pkgs/pro/linux-64
  - https://repo.continuum.io/pkgs/pro/noarch

I have found alternative channels for isoweek on the internet: ‘auto’. But when I type :

conda install -c auto isoweek

I got this:

Fetching package metadata .............
Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict:
  - isoweek -> python 2.7*
  - python 3.6*
Use "conda info <package>" to see the dependencies for each package.

Have you had the same problem?

I got it running using by creating fastai environment from environment.yml file

1 Like

Do pip install on those. Some packages are not available on conda repository.

First install anaconda 5.0.1 (latest version) that comes bundled with python 3.6
then install each of the following:

  • pip install isoweek
  • pip install pandas_summary
  • pip install torch text
  • conda install pytorch torchvision cuda80 -c soumith
  • conda install -c menpo opencv3

I used an AWS Deep Learning instance p2.xlarge instance which comes with python 3.5 pre-installed. When I used pip3 install …, what I didn’t realise was that it used the default version of python which is 3.5 and that’s why you have to use pip install…

(when you use conda install, make sure you are in the conda environment)

2 Likes

I get this error too, when i increase the batch size for the training of the last layer, but I had to reduce it to train the whole network…

correct me if I’m wrong. conda install and pip install put new python packages in different directories, no? For instance, if I pip install package, it will live in standard python folder (/usr/…/python3.6/…/site-packages). Conda will not see this change since it looks for packages only in its directories (~/anaconda3/ … / site-packages)

Depends where your pip is coming from. You can do “which pip” to verify that its coming from the anadconda tree.

You should prefer to install using conda
But if a package is not available through conda distribution but is available through pip then its fine to install it with pip as long as you are using the pip that is in your anaconda install tree.

No, they should both go to the same folder, assuming that the pip in your path is coming from anaconda.