Ubuntu help for non-linux users

I’m not new to Linux but I’m new to the maintenance of Ubuntu myself.
I always rely on someone else to do that.

I installed Ubuntu on my Windows 10 computer (not with dual boot but as Linux subsystem on Windows 10)

I made the mistake to do (I THINK THAT WAS THE MISTAKE)
sudo apt-get update

I’m trying to install pytorch with pip or conda
when I use
sudo pip
sudo conda
it says command not found.

Of course when I use the command without sudo I receive an access denied

Any help?

In Intro Workshop there is a link “Setup your Python workspace”. I encourage you to spend some time to read it as it might shed some light on your issue as well as give nice guidelines how to setup your isolated training environment.

If you have anaconda installed and have cloned the fast.ai repo from github, cd into the fastai folder and type the following in your terminal …

conda env create -n fastai python=3.6 -f environment.yml

This will create a python 3.6 environment named “fastai” with all the necessary packages installed for the course. You can then activate and use this new environment by simply tying this in your terminal:

source activate fastai

1 Like

You haven’t installed anaconda in Linux subsystem yet. See the workshop for how. Or else you haven’t added it to your PATH in .bashrc

1 Like

I did installed anaconda from the .run file as instructed.
But after I performed the update on ubuntu everything went belly up.
I typed the full path for conda and I was able to execute conda after that.

Where is that .bashrc file ?
/home/ubunu/.bashrc here?

Where is the .bashrc for when you need to do sudo conda or sudo pip?

I managed to install the whole thing on my PC but I still have problems now with the permissions with lesson1.ipynb

!ls {PATH}/valid
shows data/dogcats/valid

when i run the command
files = !ls {PATH}valid/cats | head
if shows
[“ls: cannot access ‘data/dogcats/valid/cats’: No such file or directory”]

I changed the permissions to all the files under data with the following command
chmod -R 0777

The permissions is fine - the problem is that subfolder doesn’t exist. Make sure you’ve unzipped your data into that folder, and that it exists at that path.

There are 1001 files under cats
There are 1001 files under dogs

The files are there.
All of them with 0777 permissions

We would need to see the full notebook showing your ls, pwd, etc to debug this @Gerardo . What you have above doesn’t seem to be actual code, since it’s got a typo in one of the folder names.

data needs to be a subdir of where your notebook is.

Missing images passed (I guess I did not realize that the folder was created on the same folder as the lesson)
Now I passed that section now I encountered a new error.

OK, I was able to install ubuntu with dual boot on my computer
I have two nvidia cards showing on the config :slight_smile:

Now, when I try to install the fastai environment I’m getting this when I’m executing the creation of the fastai environment

Is there anything that I can do here?

1 Like

#1 restart your machine (or at least your terminal)

#2 make sure you are in the same directory as the environment.yml file when you run the command


And glad you got Ubuntu up and running, that is an accomplishment itself :grinning:


@wgpubs it did not work.
I deleted the whole anaconda3 folder and I reinstalled the software after the updates
After that I went to fastai and I tried the

and it worked.

Finally it’s working.
I was able to go through the whole lesson 1 without any trouble.

Thanks everyone for the help

1 Like

You’re welcome and glad to hear.

You’ll be glad you made the move to linux, even if it was painful.


Hello, I have some problems in the setup phase.
I have my linux subsystem correctly working. It results in C:\Users\Walter\AppData\Local\lxss\home\Walter. Here I installed conda successfully.

Then I cloned the repo into E:…somepath…\fastai (because I want to keep all data into disk E)
and from this path I tried :

conda env create -n fastai python=3.6 -f environment.yml
but I obtain this error:
SSLError(MaxRetryError(‘HTTPSConnectionPool(host=‘conda.anaconda.org’, port=443): Max retries exceeded with url: /soumith/linux-64/repodata.json (Caused by SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”,))’,),)

The SSL module is missing and I am not sure about how to proceed. Can someone with linux experience give me some suggestion?
Thank you

The SSL problem is solved.
Now I obtain this error when running

from fastai.transforms import *

~/anaconda3/envs/fastai/lib/python3.6/site-packages/torch/init.py in ()
51 sys.setdlopenflags(_dl_flags.RTLD_GLOBAL | _dl_flags.RTLD_NOW)
—> 53 from torch._C import *
55 all += [name for name in dir(_C)

ImportError: dlopen: cannot load any more object with static TLS.

I am not able to find in the forum this issue.
Any suggestion ?
Thank you

I would cd into your fastai directory and do:

  1. git pull
  2. conda env update -f environment.yml
  3. restart your terminal
  4. if still not working, restart your machine.


Thank you,

git pull gives some final error:

error: Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge.

Anyway I executed your 2. and 3. points.
Now the notebook gives some missing modules during:
from fastai.imports import *
In particular cv2, so I installed opencv, and now bcolz is missing.
In my previous reply this instruction passed without errors.