1.打开配置文件

sudo nano /boot/config.txt

打开以下选项

"dtparam=i2c_arm=on"

ctrl + o 保存

ctrl + x 退出

2.刷新配置文件

sudo raspi-config

3.打开 I2c选项

4.重启

5.再次运行

参考:

https://www.raspberrypi.org/forums/viewtopic.php?t=100189

python smbus IOError: [Errno 2] No such file or directory的更多相关文章

  1. odoo开发笔记 -- 还原数据库后,异常:ir_attachment: IOError: [Errno 2] No such file or directory: u'/var/...'

    场景描述: 恢复Odoo数据后,抛出错误导致无法进入页面 -- ::, INFO aeo odoo.addons.base.ir.ir_attachment: _read_file reading / ...

  2. 对于python中“FileNotFoundError: [Errno 2] No such file or directory”的解决办法

    在我们使用vscode运行Python代码时遇到的情况 一.出现原因:这里是由于Vscode中,python里的路径是相对与工作目录来进行定位的.所以在多级目录情况下,若不设置绝对路径,往往找不到相应 ...

  3. VSCode python 遇到的问题:vscode can't open file '<unprintable file name>': [Errno 2] No such file or directory

    代码很简单,就两行: import pandas as pd import netCDF4 as nc dataset = nc.Dataset('20150101.nc') 环境:在VSCode中左 ...

  4. 关于python中的 “ FileNotFoundError: [Errno 2] No such file or directory: '……'问题 ”

    今天在学python时,在模仿一个为图片加上图标并移动到指定文件夹的程序时遇到“FileNotFoundError: [Errno 2] No such file or directory: '152 ...

  5. python文件操作的坑( FileNotFoundError: [Errno 2] No such file or directory...)

    环境:Windows8.1, Python3.6  pycharm community 2017   c盘下有一个配置文件:setup   with open('c:\\setup','r') as ...

  6. Python中的用open打开文件错误,FileNotFoundError: [Errno 2] No such file or directory:

    学习python的文件处理,刚开始打开文件,代码如下 f = open('test_file.txt', 'r', encoding='UTF-8')RES = f.readlines()print( ...

  7. python文件和文件夹訪问File and Directory Access

    http://blog.csdn.net/pipisorry/article/details/47907589 os.path - Common pathname manipulations 都是和路 ...

  8. can't open file 'manage.py': [Errno 2] No such file or directory

    python Django创建数据库时can't open file 'manage.py': [Errno 2] No such file or directory 参考https://blog.c ...

  9. os.chdir("/deepmatching") OSError: [Errno 2] No such file or directory: '/deepmatching'

    #os.chdir("/deepmatching")os.chdir(os.path.dirname(os.path.abspath("deepmatching1&quo ...

随机推荐

  1. jQuery AJAX基础

    一.JSON 定义:             JSON(JavaScript Object Notation, JS对象标记)是一种轻量级的数据交换格式.         它基于 ECMAScript ...

  2. template中实现加减乘除数学运算

    django模板只提供了加法的filter,没有提供专门的乘法和除法运算:django提供了widthratio的tag用来计算比率,可以变相用于乘法和除法的计算. # 加法{{value|add:1 ...

  3. 【转载】网站配置Https证书系列(三):IIS网站设置Http链接直接跳转Https安全连接

    Http链接请求是以明文的方式传输,在传输的过程中很容易被篡改数据,一个典型的例子就是运营商的网络劫持注入广告信息等,而Https请求则是安全加密的请求,报文数据以密文的形式进行传输.当IIS网站配置 ...

  4. PimaIndiansdiabetes-数据预处理实验(一)

    有趣的事,Python永远不会缺席! 如需转发,请注明出处:小婷儿的python https://www.cnblogs.com/xxtalhr/p/10859517.html 链接:https:// ...

  5. sql server行转列

    创建测试数据 学生表 Student create table Student(S# varchar(10),Sname nvarchar(10),Sage datetime,Ssex nvarcha ...

  6. zabbix 3.2.2 server web展示如何显示中文 (三)

    1.确认zabbix是否开启了中文支持功能(/var/www/html/zabbix/include/locales.inc.php) 2.登录zabbix后,点击可爱的小公主吧 Admin(zabb ...

  7. Windows 10安装

    使用U盘安装操作系统教程 本教程介绍如何使用U盘安装操作系统,以安装Windows 10过程作为举例. 1 获取操作系统iso镜像文件 获取操作系统ISO镜像文件有很多途径,此处介绍从微软官网下载wi ...

  8. C#中流Stream的使用-学习

    概念 提供字节序列的一般视图.这是一个抽象类. 子类: Derived Microsoft.JScript.COMCharStream System.Data.OracleClient.OracleB ...

  9. python xml文件解析 及生成xml文件

    #解析一个database的xml文件 """ <databaselist type="database config"> <dat ...

  10. 6. kafka序列化和反序列化

    https://blog.csdn.net/weixin_33690963/article/details/91698279 kafka序列化: 生产者在将消息传入kafka之前需要将其序列化成byt ...