-2

I have a script that does import yaml and then uses yaml.load and yaml.Loader

I previously installed yaml months ago using pip3 install yaml, and that worked for another script

Now, running another script was saying ModuleNotFoundError: No module named 'yaml' again (but ipython works when doing import yaml as well as from yaml import load). Tried installing using brew but now I get a new error AttributeError: module 'yaml' has no attribute 'load'.

Why is this? And how can I fix whatever's going on? I don't have any files named 'yaml' at my script level

user1039484
  • 39
  • 1
  • 7

1 Answers1

-2

python3 -m pip install pyyaml worked. I should rly learn pip/installing

user1039484
  • 39
  • 1
  • 7