0

I try to run code !sudo chown -R jupyter:jupyter /home/jupyter/training-data-analyst from https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/ai-for-finance/solution/aapl_regression_scikit_learn.ipynb in Google Colab jupyter notebook.

Although my account authenticated with authentication_user() method:

from google.colab import auth
auth.authenticate_user()

I receive the error:

chown: invalid user: ‘jupyter:jupyter’

I appreciate if you let me know how can I solve the problem, with a little bit description about what exactly happens when I run this code. All I have understood is that chown let me change the user and/or group ownership of a given file.

When I run !ls -la on jupyter cell(in current working directory of /content) the output is:

total 28
drwxr-xr-x 1 root root 4096 Nov 22 19:27 .
drwxr-xr-x 1 root root 4096 Nov 22 18:34 ..
drwxr-xr-x 1 root root 4096 Nov 22 18:47 .config
drwxr-xr-x 2 root root 4096 Nov 22 19:27 .ipynb_checkpoints
drwxr-xr-x 1 root root 4096 Nov 13 17:33 sample_data 

the same result for /home directory:

total 8
drwxr-xr-x 2 root root 4096 Apr 24  2018 .
drwxr-xr-x 1 root root 4096 Nov 22 18:34 ..

I don't know even if I clone training-data-analyst folder from google github, the code work or not! cause it states the user is invalid!

1 Answer 1

0

It is an error because the user jupyter does not exist.

You need to create it first with

!groupadd jupyter
!useradd -g jupyter jupyter
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.