[英]ModuleNotFoundError: No module named 'tensorflow_datasets'. How to solve this?
I'm new to Python and am usually running Spyder or VS Code.我是 Python 的新手,通常运行 Spyder 或 VS Code。 I am running a script right now that gives me the error: ModuleNotFoundError: No module named 'tensorflow_datasets'.
我现在正在运行一个脚本,它给了我错误:ModuleNotFoundError: No module named 'tensorflow_datasets'。
I can see on my pip list
that I have tensorflow ver.我可以在我的
pip list
中看到我有 tensorflow 版本。 2.4.0 and tensorflow_datasets ver. 2.4.0 和 tensorflow_datasets 版本。 4.2.0.
4.2.0。 The location of
tensorflow
is: tensorflow
的位置是:
Location: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
And the location of tensorflow_datasets
is:而
tensorflow_datasets
的位置是:
Location: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
Maybe it has something to do with the location/directory?也许它与位置/目录有关? Since I am using Spyder and VS Code through Anaconda.
因为我通过 Anaconda 使用 Spyder 和 VS Code。
I am running macOS Big Sur 11.1我正在运行 macOS Big Sur 11.1
Are you using IDE or Jupyter?您使用的是 IDE 还是 Jupyter?
IDE: IDE:
Choose Anacondna as your default environment, Mac is running on Python 2 by default.选择 Anaconda 作为默认环境,Mac 默认运行在 Python 2 上。
Jupyter: Kernel>Change Kernel Jupyter:内核>更改 Kernel
Pycharm: Bottom right Pycharm:右下角
VS Code: Bottom left VS 代码:左下角
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.