简体   繁体   中英

how to install kaggle_datasets?

I'm trying to follow the Kaggle Monet CycleGAN Tutorial and in the first block of code where we are importing the libraries, one of them is kaggle_datasets. I have pip installed Kaggle, but when I try to import kaggle_datasets I get the error:ModuleNotFoundError: No module named 'kaggle_datasets'. I tried pip install kaggle_datasets and pip install kaggle-datasets, but neither of them work both return the errors: ERROR: Could not find a version that satisfies the requirement kaggle_datasets (from versions: none) ERROR: No matching distribution found for kaggle_datasets

I've been looking and can't find anywhere that shows how to install kaggle_datasets, only how to download specific datasets. The exact line in the tutorial I'm following is: from kaggle_datasets import KaggleDatasets

here is the link: https://www.kaggle.com/amyjang/monet-cyclegan-tutorial

If you are using Kaggle, it uses Jupyter conventions so the line should have a ! before it to run console commands, I believe, so:

!pip install kaggle_datasets

If that doesn't fix it, is your kernel connected to the internet? That could also be an issue!

The kaggle_datasets module can be used in Google Colab and Kaggle Notebook. It's not a part of pip.

If you want to load the dataset on a Kaggle Notebook, follow these steps.

(1) Click on "Add or upload data"

(2) Search for the dataset that you want (3) Expand the "Data box" and load the dataset from the specified path

If you want to train this AI locally, manually download the photo and Monet datasets from Monet CycleGAN Tutorial Data . As you follow the Notebook , remember to change str(GCS_PATH + '/monet_tfrec/*.tfrec') and str(GCS_PATH + '/photo_tfrec/*.tfrec') to the paths where you download the datasets. Don't import kaggle_datasets because you already have the datasets ready-to-go in your local disk.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM