from datasets import dataset_utils ImportError: No module named datasets. when i am writing this in python sript.
import tensorflow as tf from datasets import dataset_utils slim = tf.contrib.slim But i am getting error.
from datasets import dataset_utils ImportError: No module named datasets I found this solution How can jupyter access a new tensorflow module installed in the right path? I did the same and i have dataset packages at path anaconda/lib/python2.7/site-packages/. Still i am getting same error.
25 Answers
You can find the folder address on your device and append it to system path.
import sys sys.path.append(r"D:\Python35\models\slim\datasets"); import dataset_utils You'll need to do the same with 'nets' and 'preprocessing'
sys.path.append(r"D:\Python35\models\slim\nets"); import vgg sys.path.append(r"D:\Python35\models\slim\preprocessing"); import vgg_preprocessing 5pip install datasets I solved it this way.
Datasets is present in Since 'models' are not installable from pip (at the time of writing), they are not available in python load paths by default. So either we copy them or manually add to the path. Here is how I setup env before running the code:
# git clone or wget wget -O models.zip unzip models.zip # add it to Python PATH export PYTHONPATH=$PYTHONPATH:$PWD/models-master/slim # now we are good to call `python mytensorflow.py` 1It's using the datasets package in the TF-slim image models library, which is in:
Having done that though, in order to import the module as shown in the example on the slim image page, empty init.py have to be added to the models and models/slim directories.
go to and download the latest release
install the latest release from the downloaded file (202006291 is the latest version at the moment): $pip install ./EchoTorch-202006291.zip
test it out using narma10_esn.py (other examples may have some issues)
you may still need to install some more python packages not listed in the requirements file but it works once you do this.