我如何求解没有名为错误的模块?

发布于 2025-02-13 05:42:50 字数 287 浏览 0 评论 0原文

您好,我正在使用Python 3和Ros Noetic,并且我遇到了此错误

import can
ImportError: No module named can

,以前遇到了此错误,我通过Google中的非常简单的Can-Bus相关安装命令解决了它。但是我现在找不到该命令 我已经尝试了所有类似的$ sudo apt install python3-can。 但是我根本无法修复它,

谢谢...............................

hello i'm using python 3 and ros noetic, and i got this error

import can
ImportError: No module named can

I've got this error before, and I solved it through a very simple can-bus related installation command in google. But I can't find that command now
I've tried all the like $ sudo apt install python3-can.
but I can't fix it at all

thank you................

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

如痴如狂 2025-02-20 05:42:50

问题是,您的Python找不到该模块。

首先,尝试使用以下方式删除软件包,

pip uninstall python-can

然后将其重新安装,

pip install python-can

以防您安装了几个版本的Python(例如Python2和Python3),请确保您使用

pip3 

代替PIP。

接下来,您可以尝试手动搜索包装目录,以查看包装。

The problem is, that the module can't be found by your python.

first, try to remove the package with:

pip uninstall python-can

and re-install it with

pip install python-can

In case you have several versions of python installed (such as python2 and python3) make sure, you use

pip3 

instead of pip.

Next you can try to manually search your package directories for the package, if it is even there.

晚风撩人 2025-02-20 05:42:50

尝试使用git克隆库并运行设置。Py安装,对我有用。

Try cloning the library with git and running the setup.py installation, worked for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文