taline fahad
taline fahad

Reputation: 11

ModuleNotFoundError when trying to import fiftyone.zoo

import fiftyone
import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart")
session = fo.launch_app(dataset)

I tried to install zoo, fiftyone.zoo, and just fiftyone, but when trying to import it I get the following error:

ModuleNotFoundError: No module named 'fiftyone.zoo'

I upgraded pip and installed it from pycharm interpreter, but it still gave me the same error.

Upvotes: 1

Views: 3334

Answers (2)

Gtk_
Gtk_

Reputation: 3

I had this error when I tried to install fiftyone using pip on my Windows laptop (without admin rights):

ERROR: Could not install packages due to an OSError: [WinError 5] Accès refusé: '<PATH>'

So I did this :

pip install fiftyone --user

and import fiftyone as fo worked. So maybe ensure that the module is installed, and if not you can use this to install it.

Upvotes: 0

Brian Moore
Brian Moore

Reputation: 61

Just to clarify, you can install FiftyOne and all subpackages like so:

pip install fiftyone

The install docs have some troubleshooting tips if there is actually an install issue.

However, I suspect you have a folder named fiftyone/ or script named fiftyone.py in your current working directory. This would confuse Python and cause the wrong thing to be imported when you import fiftyone.

Try deleting those or moving to a different directory. Then import fiftyone.zoo should work.

Upvotes: 6

Related Questions