2017-04-21 65 views
0

我已经成功安装了一个树莓pi3 tinyos,但有很多问题: 1 - 当使任何应用程序比tinyos应用程序像闪烁我有以下错误:导入错误没有模块命名为tos时,在树莓派pi3运行python

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

而在眨眼它成功地运行 2 - 当与“进口TOS”像

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

运行Python程序了,我想 回溯一个错误(最新最后调用):

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

我想我有一个问题,路径的设置

回答

0

你需要下载软件包tinyos

提取使用tar

焦油-xzvf程序包

包cd进入提取的目录然后:

sudo的蟒蛇的setup.py安装

+0

谢谢你,我做到了这一点,但仍然是同样的问题。是以下路径正确:出口TOSROOT = “〜/ TinyOS的,主要的” 出口TOSDIR = “$ TOSROOT/TOS” 出口CLASSPATH = $ CLASSPATH:$ TOSROOT /支持/ SDK/JAVA/tinyos.jar :. 出口MAKERULES = “$ TOSROOT /支持/制造/ MAKERULES” 出口PYTHONPATH = $ PYTHONPATH:$ TOSROOT /支持/ SDK /蟒蛇 –

0

OP可以确认,你得到一个警告或错误?我看了一下TinyOS制造商,它说你引用的消息只是一个关于不推荐使用的变量的警告,它可以通过设置TINYOS_NO_DEPRECATION_WARNING环境变量来删除。摘自makerules以下

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 
0

旧环境的警告并不重要。

对于你的问题,请加蟒蛇SDK路径在〜/ .bashrc,然后尝试从TinyOS的进口TOS而不是进口TOS

相关问题