Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1627 Discussions

How to import file from google drive or kaggle dataset using Intel DevCloud jupyter environment?

Toky__Adnan
Beginner
2,952 Views

I'm trying to load datasets from kaggle datasets or google drive. I'm using Intel DevCloud jupyter notebook. How can I do it?

0 Kudos
1 Solution
ChithraJ_Intel
Moderator
2,952 Views

Hi,

Could you please create a conda enviroment using the below commands and follow the same steps as suggested earlier

conda create -n my_env -c intel python=3.6

source activate my_env

pip install kaggle --user

Hope this helps for you.

View solution in original post

0 Kudos
7 Replies
ChithraJ_Intel
Moderator
2,952 Views

Hi,

Thanks for reaching out to us.

Could you please try out the below steps to access Kaggle API in devcloud through command line.

Step 1: Install kaggle using pip as follows

pip install kaggle --user

Now, run

kaggle -h

to check whether it is installed successfully.

Step 2: To use Kaggle API, create an account in kaggle official page(https://www.kaggle.com). Then, go to "My Account" tab of user's profile and select "create new API token". This will download the kaggle.json file in your system.

Step 3: Create a .kaggle folder in devcloud home folder 

mkdir .kaggle

Now, copy the kaggle.json to that folder.

Step 4: In order to download kaggle datasets,first search for your desired dataset using the below command in devcloud terminal

kaggle datasets list -s [KEYWORD]

        Eg: If you want to download creditcard fraud detection dataset, then search like this

kaggle datasets list -s credit

        It will list all the datasets available with this keyword.For example,

        isaikumar/creditcardfraud                            Credit Card Fraud Detection Dataset                  66MB  2018-05-05 09:38:01           1797         30  0.5882353
        ananta/credit-card-data                              Credit Card Data                                      1MB  2018-08-24 02:22:36           1218         15  0.64705884
        wendykan/lending-club-loan-data                      Lending Club Loan Data                              720MB  2019-03-18 18:43:12          68843       1238  0.7352941

Step 5: To download the dataset titled "Credit Card Fraud Detection Dataset",

kaggle datasets download isaikumar/creditcardfraud

Hope it helps. Please feel free to reach out to us for further issues.

0 Kudos
Toky__Adnan
Beginner
2,952 Views

When I run the command

pip install kaggle --user

It shows the following error message:

OSError: [Errno 30] Read-only file system: '/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/tqdm'

Not only for this command. The same error message shows for pip install something. Please help me. 

0 Kudos
ChithraJ_Intel
Moderator
2,953 Views

Hi,

Could you please create a conda enviroment using the below commands and follow the same steps as suggested earlier

conda create -n my_env -c intel python=3.6

source activate my_env

pip install kaggle --user

Hope this helps for you.

0 Kudos
Toky__Adnan
Beginner
2,952 Views

Chithra_Intel (Intel) wrote:

Hi,

Could you please create a conda enviroment using the below commands and follow the same steps as suggested earlier

conda create -n my_env -c intel python=3.6

source activate my_env

pip install kaggle --user

Hope this helps for you.

 

Thanks a lot. It has been fixed.

0 Kudos
ChithraJ_Intel
Moderator
2,952 Views

Hi,

Could you please confirm whether you are able to download kaggle datasets without any issues using the solution provided.

0 Kudos
Toky__Adnan
Beginner
2,952 Views

Chithra_Intel (Intel) wrote:

Hi,

Could you please confirm whether you are able to download kaggle datasets without any issues using the solution provided.

 

Yes. I'm able to download kaggle datasets without any issues using the solution provided. Thanks again. 

0 Kudos
ChithraJ_Intel
Moderator
2,952 Views

Hi,

Thanks for the confirmation.

We are closing the case. Please feel free to raise a new thread in case if you face any further issues.

0 Kudos
Reply