![](/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.