Reputation: 105
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
Upvotes: 4
Views: 7991
Reputation: 21
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.
Upvotes: 1
Reputation: 21
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!
Upvotes: 0