Skip to content

Commit 2e0dc6a

Browse files
authored
Merge pull request #763 from theotherjimmy/better-mac-help
Correct pip install help message on Mac
2 parents a2d3fbd + ae395c5 commit 2e0dc6a

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,3 +1114,9 @@ Here is a list of configuration settings and their defaults:
11141114

11151115
### Various issues when running Mbed CLI in Cygwin environment
11161116
Currently Mbed CLI is not compatible with Cygwin environment and cannot be executed inside it (https://github.com/ARMmbed/mbed-cli/issues/299).
1117+
1118+
### Unable to download Mbed 2 library build
1119+
Mbed 2 library builds can be quite big, and may require a download manager on slower connections. You may download the library manually with the following steps:
1120+
1. Go to Mbed OS 2 releases and choose a revision - https://os.mbed.com/users/mbed_official/code/mbed/graph/
1121+
2. Click on revision of your choice, for example, the revision `4f6c30876dfa` is located at https://os.mbed.com/users/mbed_official/code/mbed/rev/4f6c30876dfa/
1122+
3. In the URL, change `rev` to `archive` and append `zip`. For example, the url found above, https://os.mbed.com/users/mbed_official/code/mbed/rev/4f6c30876dfa/, is modified to https://os.mbed.com/users/mbed_official/code/mbed/archive/4f6c30876dfa/zip

mbed/mbed.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import re
3838
import subprocess
3939
import os
40+
import platform
4041
import contextlib
4142
import shutil
4243
import stat
@@ -1633,8 +1634,10 @@ def check_requirements(self, show_warning=False):
16331634
"Unable to auto-install required Python modules.\n"
16341635
"The mbed OS tools in this program require the following Python modules: %s\n"
16351636
"You can install all missing modules by running \"pip install -r %s\" in \"%s\"" % (', '.join(missing), req_file, req_path))
1636-
if os.name == 'posix':
1637-
msg += "\nOn Posix systems (Linux, Mac, etc) you might have to switch to superuser account or use \"sudo\""
1637+
if os.name == 'posix' and platform.system() == 'Darwin':
1638+
msg += "\nOn Mac you might have to install packages as your user by adding the \"--user\" flag"
1639+
elif os.name == 'posix':
1640+
msg += "\nOn Posix systems (Linux, etc) you might have to switch to superuser account or use \"sudo\""
16381641

16391642
if show_warning:
16401643
warning(msg)

0 commit comments

Comments
 (0)