![](/img/trans.png)
[英]How to install numpy on freshly installed Python 3.5 in Windows 10?
[英]How to install mbed CLI on a Windows 10 system with Python 3.5?
我想在我的电脑上安装ARM mbed CLI。 我从官方网站上关注本教程:
https://docs.mbed.com/docs/mbed-os-handbook/en/5.1/dev_tools/cli/
其中一个先决条件是在系统上安装Python。 教程提到:
Python - mbed CLI是一个Python脚本,因此您需要使用Python才能使用它。 mbed CLI使用Python 2.7.9版进行了测试。 您可以在此处下载该版本或更新版本。
我安装了Python,但不是2.7版本。 我有Python 3.5.2 :: Anaconda 4.2.0 (64-bit)
。
下一个先决条件是安装Git和Mercurial 。 教程提到:
Git和Mercurial - mbed CLI支持Git和Mercurial存储库,因此您需要同时安装它们。
我安装了两个:
> git --version
git version 2.10.2.windows.1
> hg --version
Mercurial Distributed SCM (version 4.0)
我像这样安装mbed CLI:
> pip install mbed-cli
Collecting mbed-cli
Installing collected packages: mbed-cli
Successfully installed mbed-cli-0.9.10
但事实证明安装并不好。 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
我怀疑Python 3.5版本应该受到指责(也许它适用于Python 2.7,我不知道)。 有没有办法让它与Python 3.5一起使用? PS:我不喜欢与我现有的Python 3.5并排安装Python 2.7。 这太麻烦了。
mbed CLI需要python 2.7。*。 Python 3. *尚不支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.