简化无法导入Sklearn模块
我只是想在此处学习一些有关数据科学的知识,并遵循本教程:
https://www.youtube.com/watch?v=8m20lyczdoy 我运行该程序,它说即使我通过pip3安装了Sklearn,也没有安装它终端:
pip install scikit-learn
这是错误:
ModuleNotFoundError: No module named 'sklearn'
Traceback:
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/streamlit/scriptrunner/script_runner.py", line 554, in _run_script
exec(code, module.__dict__)
File "/Users/jeettan/Desktop/python-programming/programming.py", line 3, in <module>
from sklearn import datasets
有什么想法吗?
I'm just trying to learn a bit about data science here and following this tutorial:
https://www.youtube.com/watch?v=8M20LyCZDOY
However, when I run the program, it says that sklearn isn't installed even though I installed it through pip3 and pip with the code on my terminal:
pip install scikit-learn
Here was the error:
ModuleNotFoundError: No module named 'sklearn'
Traceback:
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/streamlit/scriptrunner/script_runner.py", line 554, in _run_script
exec(code, module.__dict__)
File "/Users/jeettan/Desktop/python-programming/programming.py", line 3, in <module>
from sklearn import datasets
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这起作用了:
我尝试使用
pip3 install scikit-learn
,但它不起作用,但是在技巧之前添加sudo
。This worked:
I tried with
pip3 install scikit-learn
but it did not work, but addingsudo
before did the trick.