0

我已经成功地在树莓派 pi3 上安装了 tinyos,但遇到了很多问题: 1-当制作除诸如 Blink 之类的 tinyos 应用程序之外的任何应用程序时,出现以下错误:

/root/tinyos-main/support/make/Makerules:56:  Old TinyOS environment variables detected.

在 Blink 中,它成功运行 2- 当运行带有“import tos”的python程序时

import tos
 a=1
 b=2
 c=a+b

我有一个类似 Traceback 的错误(最近一次通话最后一次):

File "ali.py", line 1, in <module>
    import tos
ImportError: No module named tos

我想我在设置路径时遇到了问题

4

3 回答 3

0

你需要下载包tinyos

使用解压包tar

tar -xzvf 包名

cd 进入解压后的目录,然后:

须藤 python setup.py 安装

于 2017-04-21T10:57:23.923 回答
0

旧环境的警告并不重要。

对于您的问题,请将 python SDK 路径添加到 ~/.bashrc 然后尝试from tinyos import tos而不是import tos

于 2017-08-30T11:00:35.737 回答
0

OP你能确认一下,你收到警告还是错误?我查看了 TinyOS makerules,它说您引用的消息只是关于已弃用变量的警告,可以通过设置 TINYOS_NO_DEPRECATION_WARNING 环境变量来删除它。摘自以下制造规则

ifndef TINYOS_NO_DEPRECATION_WARNING
define MAKE_VERSION_TWO_WARNING
$(WARN_STRING) Old TinyOS environment variables detected.

    This version of the TinyOS make system has deprecated the TOSDIR, TOSROOT,
    and MAKERULES environment variables. Generally, you shouldnt need
    environment variables with this version of the TinyOS make system, and if
    you are not using any older versions of TinyOS on your system you should
    delete these environment variables. If you wish to leave these variables
    but hide this warning, set the TINYOS_NO_DEPRECATION_WARNING environment
    variable. If you are looking to compile against a different TinyOS tree,
    configure the makefiles used when compiling, or setup an external TinyOS
    tree with additional source files, please visit
    https://github.com/tinyos/tinyos-main/blob/master/support/make/README.md
    for more information about the TinyOS make system.

endef
于 2017-05-15T10:14:47.927 回答