我试过pip install,但是不能指向python 3.5.2甚至卸载版本3.4.我也试过了
sudo apt-get install python3-pandas
Run Code Online (Sandbox Code Playgroud)
没有运气......
我非常绝望.有没有办法做到这一点?我在这个网站上搜索了多个解决方案,但仍然没有.
有谁知道怎么做?
谢谢
我有一个RaspberryPi和一个Logitech C920网络摄像头.我想使用这些设备作为监视/ babycam,即:通过HTTP(或任何其他协议)流式传输音频+视频,无需CPU密集视频转码
C920网络摄像头能够本地传输H264,因此理论上我不需要让RaspberyPi + VLC对视频流进行转码.
内置的C920麦克风流似乎不包含在网络摄像头流中.凸轮和麦克风是2个独立的设备.
C920还有一个内置LED指示灯.我想控制它以避免LED在录制时发光.
我怎样才能做到这一点?
此应用程序的目标是通过 TCP 处理 800 个并发客户端,每个客户端每秒发送 3.5kb xml。这些请求中的每一个都需要被解析(参见代码片段)。这发生在不同的线程上。
该项目的局限性在于它必须在小型 Raspberry Pi3(1.2 GHz 四核,1GB 内存)上运行。当我将负载增加到 150 个以上的并发客户端(80% cpu 使用率)时,我遇到了利用率问题。
当我运行这个程序时,我的开发机器似乎运行得很好。(0-1% 使用率,150 岁以下)。我知道我的开发机器比 RPI 更强大,因此运行得更好。但差距似乎太大了。
在我当前的设置中,我使用 Java nio 来处理/读取所有传入的连接。然后我使用多个线程来读取数据。
这是当前在处理线程上运行的简单代码。还尝试一次读取一个简单的 byte[] 数组 1 个字节。甚至阅读 StaX 流。我尝试过的每一种读取方式,“读取类型”操作都给出了最差的性能。
BufferedInputStream input = new BufferedInputStream(new ByteArrayInputStream(buffer.array(), 0, bytecount));
int current;
/* In this snippet input.read() is the cause of performance issues
Reading directly from byte[] gives similar poor performance.
*/
while ((current = input.read()) != -1) {
continue;
}
Run Code Online (Sandbox Code Playgroud)
根据我的分析器, Input.read() 调用在 Pi 上使用了大量的处理能力,占总 CPU 时间的 97%。另外 …
我不知道为什么会出现此错误:ImportError: No module named 'apscheduler'.
我尝试安装旧版本:
sudo pip uninstall apscheduler然后sudo pip install apscheduler==2.1.2但这对我不起作用。
这是我的代码:
import os ,subprocess
from apscheduler.schedulers.blocking import BlockingScheduler
def scheduled_job():
sync_to_drive=subprocess.check_output(["./gdrive", "sync", "upload", "--keep-local", "/home/pi/Documents"], cwd="/home/pi/Downloads")
print (sync_to_drive)
sched = BlockingScheduler()
sched.add_job(scheduled_job, "interval", seconds=5)
sched.start()
Run Code Online (Sandbox Code Playgroud) 我有一个基于 raspberry pi 3 的 docker swarm。我有 3 个节点。我在我的笔记本电脑上创建了一个图像并将其推送到 docker 注册表。
如果我尝试使用 docker run 在 swarm 中的节点上启动图像,它会按预期工作。
docker run -ti alexellis2/pi-sharp:0.1
Run Code Online (Sandbox Code Playgroud)
但是如果我尝试使用 docker 服务启动它,它就会失败。
docker service create --name test alexellis2/pi-sharp:0.1
Run Code Online (Sandbox Code Playgroud)
错误 1/1:没有合适的节点(3 个节点上不受支持的平台)
如果我对服务进行 docker 检查,它会显示此信息。
"Placement": {
"Platforms": [
{
"Architecture": "amd64",
"OS": "linux"
}
]
},
Run Code Online (Sandbox Code Playgroud)
我试图修剪容器和图像无济于事。
我的问题是为什么我可以使用 docker run 但不能使用 docker service 来使用图像?
好的,我在 Microsoft 文档中阅读了有关 WSL 的内容 https://learn.microsoft.com/en-us/windows/wsl/about。
第一段说
适用于 Linux 的 Windows 子系统允许开发人员直接在 Windows 上运行 Linux 环境(包括大多数命令行工具、实用程序和应用程序),无需修改,无需虚拟机开销。
我的问题是;作为开发人员,在什么情况下我希望在 Windows 中运行 Linux 环境?可能是当我为 Linux 操作系统开发一些东西但没有可用的 Linux 操作系统时?或者还有更多内容?
我是该子系统的新手,因此任何指导将不胜感激。
linux windows raspberry-pi raspberry-pi3 windows-subsystem-for-linux
我试图在与 smbus2 错误作斗争后让以下代码正常工作,但我现在发现出现以下错误,并且无法找到如何修复它。
我知道传感器正在工作,因为如果我从http://www.raspberrypi-spy.co.uk/运行 bme280.py就可以正常工作。
所以我的错误是:
pi@wpi:~/weather $ python bme280_sensor.py
Traceback (most recent call last):
File "bme280_sensor.py", line 9, in <module>
bme280.load_calibration_params(bus, address)
AttributeError: 'module' object has no attribute 'load_calibration_params'
i2detect
pi@wpi:~/weather $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- …Run Code Online (Sandbox Code Playgroud) 我最近购买了一个新的无线适配器,用于在 Raspberry Pi 3B+ 上运行的 Kali Linux。
规范中描述的驱动程序是 RTL8812。我假设(你知道他们说什么)它将是 RTL8812AU,它有一个 ARM64 驱动程序可以安装在 Kali 上。
然而,在我插入后查找 id 产品后,令我惊讶的是,它实际上是 RTL8812BU ( https://wikidevi.com/wiki/Realtek_RTL8812BU_USB_Module )。
[ 2.082339] systemd[1]: Detected architecture arm64.
[ 2.099491] systemd[1]: Set hostname to <kali>.
[ 2.159353] usb 1-1.1.2: new high-speed USB device number 4 using dwc_otg
[ 2.249231] usb 1-1.1.2: New USB device found, idVendor=0bda, idProduct=b812, bcdDevice= 2.10
[ 2.251726] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2.254302] usb 1-1.1.2: Product: USB3.0 802.11ac 1200M Adapter
[ 2.254309] …Run Code Online (Sandbox Code Playgroud) 大家好,我一直在为我的树莓派设置对 node-red 的远程访问。我已经修改了 settings.js 并安装了 node-red-admin 但是当我去启动 node-red 我收到以下错误:
Error: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small
at Object.createSecureContext (_tls_common.js:131:17)
at Server.setSecureContext (_tls_wrap.js:1152:27)
at Server (_tls_wrap.js:1030:8)
at new Server (https.js:65:14)
at Object.createServer (https.js:89:10)
at Object.<anonymous> (/usr/lib/node_modules/node-red/red.js:141:20)
at Module._compile (internal/modules/cjs/loader.js:945:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:962:10)
at Module.load (internal/modules/cjs/loader.js:798:32)
at Function.Module._load (internal/modules/cjs/loader.js:711:12) {
library: 'SSL routines',
function: 'SSL_CTX_use_certificate',
reason: 'ee key too small',
code: 'ERR_SSL_EE_KEY_TOO_SMALL'
}
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Service RestartSec=100ms expired, scheduling restart.
nodered.service: Scheduled restart …Run Code Online (Sandbox Code Playgroud) 有人尝试将 aws-cliv2 放入树莓派吗?下面有一条错误消息,表示执行格式错误。
[我的环境](我的 Raspberry Pi3 上的 uname)Linux raspberrypi 4.19.97-v7+ #1294 SMP Thu XXX XX XX:XX:XX GMT 2020 armv7l GNU/Linux
[错误消息] pi@raspberrypi :~/XX/cdkContainer $ sudo ./aws/install ./aws/install: 78: ./aws/install: /XX/cdkContainer/aws/dist/aws: Exec 格式错误 您可以现在运行:/usr/local/bin/aws --version
pi@raspberrypi :~/XX/cdkContainer $ aws --version bash: /usr/local/bin/aws: 无法执行二进制文件: Exec 格式错误
我刚刚参考了网站上的 aws 文档:但是,它不适用于我的 Raspberry Pi 3。
linux amazon-web-services raspberry-pi aws-cli raspberry-pi3
raspberry-pi3 ×10
linux ×3
python-3.x ×3
arm ×2
python ×2
raspberry-pi ×2
apscheduler ×1
arm64 ×1
aws-cli ×1
docker ×1
docker-swarm ×1
driver ×1
http ×1
https ×1
java ×1
node-red ×1
pandas ×1
pip ×1
raspbian ×1
ssl ×1
vlc ×1
webcam ×1
windows ×1
windows-subsystem-for-linux ×1
wireless ×1