python-3.x - Module not found error even though I have pip installed the module
问题描述
I am working with the CANard library which can be found here: https://github.com/normaldotcom/CANard
I have correctly pip installed the module, but I am still getting an error and I am not sure why.
Here is my code:
from canard import can, bus
from canard.hw import socketcan
from canard.file import jsondb
parser = jsondb.JsonDbParser()
b = parser.parse('test_can.json')
CHANNEL = "can0"
dev = socketcan.SocketCanDev(CHANNEL)
dev.start()
while True:
frame = dev.recv()
signals = b.parse_frame(frame)
if signals:
for s in signals:
print(s)
Here is the error:
ModuleNotFoundError: No module named 'canard.file'
canard.file does exist in the repo... any solution to this?
Thanks to all of those who reply in advance.
解决方案
I was able to fix this by pip installing the git repo directly
pip install git+https://github.com/normaldotcom/CANard
推荐阅读
- android - 将数据从存储库传递到 ViewModel
- javascript - 颜色标记定期更换
- node.js - Node.js Mongoose 中的点赞数
- excel - Excel - 聚合:从非空白单元格中提取数据
- angular - 如何自定义数字输入类型单元格 ag-grid
- jquery - DataTable 使用 for 循环添加新行
- java - Laravel 5.2 - 建模器/Laravel-Selenium - 警告 - 抛出异常 java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException
- angular - 回调函数不会调用其类的其他成员函数
- amazon-web-services - Docker 集群模式 | telnet:无法连接到远程主机:主机无法访问
- apache-spark - Spark 重新分区未按预期工作