Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 7 months ago.
Permissions problems using mbed-cli on mac OS
I'm trying to install mbed-cli and the 'blinky' program on macOS 10.13.4, and having a bunch of issues that seem to involve file permissions, since the /Library/Python directory is owned by root. I've used Python before but I was never an expert, and my skills are rusty, so I don't know how to get around these problems. (And the docs should be updated to provide instructions that work on the current OS!)
I've gotten some ways by prefixing `sudo` to the easy_install and pip commands, but then `mbed import` fails:
transcript
$ mbed import https://github.com/ARMmbed/mbed-os-example-blinky [mbed] Importing program "mbed-os-example-blinky" from "https://github.com/ARMmbed/mbed-os-example-blinky" at latest revision in the current branch [mbed] Adding library "mbed-os" from "https://github.com/ARMmbed/mbed-os" at rev #ae6c7c60f91c [mbed] Auto-installing missing Python modules... [mbed] WARNING: Unable to auto-install required Python modules. --- [mbed] WARNING: ----------------------------------------------------------------- [mbed] WARNING: The mbed OS tools in this program require the following Python modules: mbed_ls, mbed_host_tests, mbed_greentea, beautifulsoup4, fuzzywuzzy, pyelftools, jsonschema [mbed] WARNING: You can install all missing modules by running "pip install -r requirements.txt" in "/Couchbase/Embedded/mbed-os-example-blinky/mbed-os" [mbed] WARNING: On Posix systems (Linux, Mac, etc) you might have to switch to superuser account or use "sudo"
So then I do what the warning suggests:
transcript
$ cd /Couchbase/Embedded/mbed-os-example-blinky/mbed-os $ sudo pip install -r requirements.txt ... lots of installation logging here ... matplotlib 1.3.1 requires nose, which is not installed. matplotlib 1.3.1 requires tornado, which is not installed. mock 2.0.0 has requirement six>=1.9, but you'll have six 1.4.1 which is incompatible. Installing collected packages: mbed-ls, setuptools, hidapi, pyOCD, mbed-host-tests, lockfile, pbr, funcsigs, mock, mbed-greentea, beautifulsoup4, fuzzywuzzy, pyelftools, functools32, jsonschema Running setup.py install for mbed-ls ... done Found existing installation: setuptools 18.5 Uninstalling setuptools-18.5: Could not install packages due to an EnvironmentError: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', '/private/tmp/pip-uninstall-3nVn3H/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-3nVn3H/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/private/tmp/pip-uninstall-3nVn3H/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-3nVn3H/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/private/tmp/pip-uninstall-3nVn3H/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-3nVn3H/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/private/tmp/pip-uninstall-3nVn3H/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-3nVn3H/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/private/tmp/pip-uninstall-3nVn3H/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-3nVn3H/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'")]
Any suggestions?
From this error message:
mock 2.0.0 has requirement six>=1.9, but you'll have six 1.4.1 which is incompatible.
It sounds like it might be this issue:
https://github.com/pypa/pip/issues/3165
there's a few workarounds suggested on the ticket, like:
pip install
ignore-installed sixThe one I've used successfully is to "brew install python" and then use that version of python rather than the system python.
posted by Traun Leyden 15 May 2018Yeah, I was afraid I might have to go with a whole new python installation. Sigh. https://xkcd.com/1987/
posted by Jens Alfke 15 May 2018