我想在我的电脑上安装ARM mbed CLI。我遵循官方网站上的这个教程:
https://docs.mbed.com/docs/mbed-os-handbook/en/5.1/dev_tools/cli/
先决条件之一是在系统上安装Python。本教程提到:
Python - mbed CLI is a Python script, so you’ll need Python in order to use it. mbed CLI was tested with version 2.7.9 of Python. You can download that or a newer version here.
我确实安装了Python,但没有安装2.7版本。我改成了Python 3.5.2 :: Anaconda 4.2.0 (64-bit)
。
下一个先决条件是安装Git和Mercurial。本教程提到:
Git and Mercurial - mbed CLI supports both Git and Mercurial repositories, so you’ll need to install both. Note: The directories of Git and Mercurial executables (git and hg) need to be in your system’s PATH.
我都安装了:
我是这样安装mbed CLI的:
但结果发现安装不好。windows命令行无法识别mbed命令:
> mbed --help
Traceback (most recent call last):
File "c:\anaconda3\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "c:\anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Anaconda3\Scripts\mbed.exe\__main__.py", line 5, in <module>
File "c:\anaconda3\lib\site-packages\mbed\mbed.py", line 989
sorted_scms = sorted(sorted_scms, key=lambda (m, _): not m)
^
SyntaxError: invalid syntax
我怀疑这是Python3.5版本的原因(也许它可以与Python2.7一起工作,我不知道)。有没有办法让它与Python3.5一起工作?PS:我不喜欢将Python2.7与我现有的Python3.5并排安装。那太麻烦了。在
mbed CLI需要python2.7.*。Python 3.*尚不受支持。在
相关问题 更多 >
编程相关推荐