简体   繁体   English

在运行Android的Raspberry Pi 3上配置Python 3

[英]Configuring Python 3 on a Raspberry Pi 3 running Android things

I have been following the following tutorial: https://codelabs.developers.google.com/codelabs/androidthings-assistant/#2 我一直在关注以下教程: https : //codelabs.developers.google.com/codelabs/androidthings-assistant/#2

When I get to configuring the virtual python environment I get this: rpi3:/ # python3 /system/bin/sh: python3: not found 当我开始配置虚拟python环境时,我得到了:rpi3:/#python3 / system / bin / sh:python3:not found

I restarted the adb with adb root, but this doesn't correct the issue. 我用adb root重新启动了adb,但这不能解决问题。 As well using su 0 apt-get update produces that apt-get isn't found. 以及使用su 0 apt-get update都会导致找不到apt-get。 Am I using the command incorrectly here? 我在这里使用命令不正确吗?

Well, as it turns out perhaps I didn't understand the documentation here. 好吧,事实证明,我可能不理解此处的文档。 I was getting hung up on the python configuration of the credential.json file. 我一直挂在credential.json文件的python配置上。 The problem was where I was attempting to do this, which was on the Raspberry Pi running Android things. 问题出在我尝试执行此操作的地方,那是在运行Android的Raspberry Pi上。 Which was not needed. 不需要。 Attempting to install python and the virtual environment on the Pi. 尝试在Pi上安装python和虚拟环境。 I ended up creating the credential file on a different machine. 我最终在另一台计算机上创建了凭证文件。 My mistake was thinking the development machine meant my Pi, rather than where I am working in Android Studio etc. 我的错误是认为开发机器意味着我的Pi,而不是我在Android Studio中工作的地方。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM