Installing ipython on MacOS X tries to install to /System
See original GitHub issueTrying to install ipython “out of the box” on Mac OS X 10.7 using pip fails
It looks like it’s trying to install files into “/System/Library/Frameworks/Python.framework/Versions/2.7/share”
There’s no reason anything should be installed in there by pip.
Related? https://github.com/pypa/pip/issues/295 and https://github.com/ipython/ipython/issues/1231#issuecomment-3366087
[schwa@ungoliant] ~$ pip install ipython
Downloading/unpacking ipython
Running setup.py egg_info for package ipython
no previously-included directories found matching 'IPython/deathrow'
no previously-included directories found matching 'IPython/frontend/html/notebook/static/mathjax'
warning: no previously-included files found matching 'docs/#*'
warning: no previously-included files found matching 'docs/man/*.1'
no previously-included directories found matching 'docs/attic'
no previously-included directories found matching 'docs/build'
no previously-included directories found matching 'docs/gh-pages'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.flc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '.dircopy.log' found anywhere in distribution
Installing collected packages: ipython
Running setup.py install for ipython
error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/share': Permission denied
Complete output from command /usr/bin/python -c "import setuptools;__file__='/Users/schwa/build/ipython/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/c9/pqvs14g940j9q5dxgh8njsnh0000gn/T/pip-eBq04h-record/install-record.txt:
running install
running build
running build_py
running install_lib
copying build/lib/IPython/.git_commit_info.ini -> /Library/Python/2.7/site-packages/IPython
running install_data
creating /System/Library/Frameworks/Python.framework/Versions/2.7/share
error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/share': Permission denied
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/Users/schwa/build/ipython/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/c9/pqvs14g940j9q5dxgh8njsnh0000gn/T/pip-eBq04h-record/install-record.txt failed with error code 1
Storing complete log in /Users/schwa/Library/Logs/pip.log
[schwa@ungoliant] ~$
Issue Analytics
- State:
- Created 12 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
How to Install iPython on MacOS? - GeeksforGeeks
Follow the below steps to install iPython package on macOS using the setup.py file: Step 1: Download the latest source package of iPython...
Read more >Installing IPython
There are multiple ways of installing IPython. This page contains simplified installation instructions that should work for most users.
Read more >Install IPython based on built-in Python on Mac OS X
We need sudo because the packages are installed in the system folder which only the root can access. The [all] tag in the...
Read more >python - unable to install ipython on mac - Stack Overflow
Try this command: python -m IPython.
Read more >Installing IPython — IPython 8.7.0 documentation
Make sure you have the latest version of pip (the Python package manager) installed. If you do not, head to Pip documentation and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The workaround (at least for ipython) is to add these lines to ~/.pydistutils.cfg:
@SamB Well, it’s a bad interaction between a not-very-sophisticated feature in distutils (
data_files
), which is in the CPython tree, and Apple’s choice to lay out OS X system installs of Python differently from any other Python installation, and in a way that violates distutils’ assumption (legitimate with an unmodified Python build) thatsite-packages
is located beneathsys.prefix
. So you can take your pick of where you want to lay the blame there 😉The most likely path to getting the bug fixed in a reasonable time frame would actually be for ipython’s
setup.py
to detect OS X framework builds and leave out thedata_files
kwarg in that case. That would be quite easy to do.