无法从Sklearn导入方法(使用VSCODE)
我正在使用vscode,并且我导入kdtree
这样的
from sklearn.neighbors import KDTree
时候,当kdtree停留在白色时(这意味着VSCODE找不到此方法)
我在Linux上使用Python3.8,而Mac
< 3.9强>附加信息: 我已经安装了sklearn,然后在sklearn.neighbors中检查了 init .py文件
。 sklearn.neighbors inte init .py .py
为什么kdtree零件持续白色?
I'm using VSCode, and I import KDTree
like this
from sklearn.neighbors import KDTree
while the KDTree stays in white(which means VSCode cannot find this method)
I'm using python3.8 on my Linux and 3.9 on my Mac
addtional info:
I've installed sklearn, and I checked init.py file in sklearn.neighbors
It looks like this
sklearn.neighbors init.py
Why the KDTree parts stays in white?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果
kdtree
没有以预期的颜色突出显示,则并不意味着VS代码找不到此方法。这可能意味着您尚未在程序中访问此方法。尝试创建kdtree
对象,它应该按预期工作。请注意,如果您尚未安装“ Sklearn”,则需要先在使用
sklearn.kdtree
之前先安装它。If
KDTree
is not highlighted in the expected color, it doesn't mean VS-Code could not find this method. It could just mean that you have not accessed this method yet in your program. Try creating aKDTree
object, it should work as expected.Note that if you haven't installed "sklearn" yet, you would need to install it first before using
sklearn.KDTree
.