Python Forum
install ipython on Mac - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: install ipython on Mac (/thread-1148.html)



install ipython on Mac - landlord1984 - Dec-08-2016

Hello all,

After many years with C, C++ and Matlab, I have decided to learn using Python now.

But my first obstacle is how to successfully install ipython on my Mac. I followed the instructions I searched but the installation seems to be failed. Below are the messages I got:

XXXs-MacBook-Air-2:~ Lan$ sudo pip install ipython[all]
The directory '/Users/Lan/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/Lan/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: ipython[all] in /Library/Python/2.7/site-packages
Requirement already satisfied: decorator in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: setuptools>=18.5 in ./Library/Python/2.7/lib/python/site-packages (from ipython[all])
Requirement already satisfied: pickleshare in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: backports.shutil-get-terminal-size; python_version == "2.7" in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: pygments in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: pexpect; sys_platform != "win32" in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: pathlib2; python_version == "2.7" or python_version == "3.3" in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: simplegeneric>0.8 in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.3 in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: traitlets>=4.2 in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: appnope; sys_platform == "darwin" in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: notebook; extra == "all" in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: ipykernel; extra == "all" in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: qtconsole; extra == "all" in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: testpath; extra == "all" in /Library/Python/2.7/site-packages (from ipython[all])
Collecting ipywidgets; extra == "all" (from ipython[all])
  Downloading ipywidgets-5.2.2-py2.py3-none-any.whl (43kB)
    100% |████████████████████████████████| 51kB 1.2MB/s 
Collecting Sphinx>=1.3; extra == "all" (from ipython[all])
  Downloading Sphinx-1.5-py2.py3-none-any.whl (1.7MB)
    100% |████████████████████████████████| 1.7MB 163kB/s 
Requirement already satisfied: nbformat; extra == "all" in /Library/Python/2.7/site-packages (from ipython[all])
Requirement already satisfied: nbconvert; extra == "all" in /Library/Python/2.7/site-packages (from ipython[all])
Collecting ipyparallel; extra == "all" (from ipython[all])
  Downloading ipyparallel-5.2.0-py2.py3-none-any.whl (188kB)
    100% |████████████████████████████████| 194kB 4.7MB/s 
Collecting requests; extra == "all" (from ipython[all])
  Downloading requests-2.12.3-py2.py3-none-any.whl (575kB)
    100% |████████████████████████████████| 583kB 1.3MB/s 
Collecting nose>=0.10.1; extra == "all" (from ipython[all])
  Downloading nose-1.3.7-py2-none-any.whl (154kB)
    100% |████████████████████████████████| 163kB 3.1MB/s 
Requirement already satisfied: numpy; extra == "all" in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from ipython[all])
Requirement already satisfied: ptyprocess>=0.5 in /Library/Python/2.7/site-packages (from pexpect; sys_platform != "win32"->ipython[all])
Requirement already satisfied: six in ./Library/Python/2.7/lib/python/site-packages (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython[all])
Requirement already satisfied: wcwidth in /Library/Python/2.7/site-packages (from prompt-toolkit<2.0.0,>=1.0.3->ipython[all])
Requirement already satisfied: enum34; python_version == "2.7" in /Library/Python/2.7/site-packages (from traitlets>=4.2->ipython[all])
Requirement already satisfied: ipython-genutils in /Library/Python/2.7/site-packages (from traitlets>=4.2->ipython[all])
Requirement already satisfied: terminado>=0.3.3; sys_platform != "win32" in /Library/Python/2.7/site-packages (from notebook; extra == "all"->ipython[all])
Requirement already satisfied: tornado>=4 in /Library/Python/2.7/site-packages (from notebook; extra == "all"->ipython[all])
Requirement already satisfied: jupyter-core in /Library/Python/2.7/site-packages (from notebook; extra == "all"->ipython[all])
Requirement already satisfied: jinja2 in /Library/Python/2.7/site-packages (from notebook; extra == "all"->ipython[all])
Requirement already satisfied: jupyter-client in /Library/Python/2.7/site-packages (from notebook; extra == "all"->ipython[all])
Requirement already satisfied: widgetsnbextension>=1.2.6 in /Library/Python/2.7/site-packages (from ipywidgets; extra == "all"->ipython[all])
Collecting babel!=2.0,>=1.3 (from Sphinx>=1.3; extra == "all"->ipython[all])
  Downloading Babel-2.3.4-py2.py3-none-any.whl (7.1MB)
    100% |████████████████████████████████| 7.1MB 125kB/s 
Collecting docutils>=0.11 (from Sphinx>=1.3; extra == "all"->ipython[all])
  Downloading docutils-0.12.tar.gz (1.6MB)
    100% |████████████████████████████████| 1.6MB 526kB/s 
Collecting alabaster<0.8,>=0.7 (from Sphinx>=1.3; extra == "all"->ipython[all])
  Downloading alabaster-0.7.9-py2.py3-none-any.whl
Collecting snowballstemmer>=1.1 (from Sphinx>=1.3; extra == "all"->ipython[all])
  Downloading snowballstemmer-1.2.1-py2.py3-none-any.whl (64kB)
    100% |████████████████████████████████| 71kB 2.8MB/s 
Collecting imagesize (from Sphinx>=1.3; extra == "all"->ipython[all])
  Downloading imagesize-0.7.1-py2.py3-none-any.whl
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /Library/Python/2.7/site-packages (from nbformat; extra == "all"->ipython[all])
Requirement already satisfied: entrypoints in /Library/Python/2.7/site-packages (from nbconvert; extra == "all"->ipython[all])
Requirement already satisfied: mistune!=0.6 in /Library/Python/2.7/site-packages (from nbconvert; extra == "all"->ipython[all])
Requirement already satisfied: pyzmq>=13 in /Library/Python/2.7/site-packages (from ipyparallel; extra == "all"->ipython[all])
Collecting futures; python_version == "2.7" (from ipyparallel; extra == "all"->ipython[all])
  Downloading futures-3.0.5-py2-none-any.whl
Requirement already satisfied: singledispatch in /Library/Python/2.7/site-packages (from tornado>=4->notebook; extra == "all"->ipython[all])
Requirement already satisfied: certifi in /Library/Python/2.7/site-packages (from tornado>=4->notebook; extra == "all"->ipython[all])
Requirement already satisfied: backports_abc>=0.4 in /Library/Python/2.7/site-packages (from tornado>=4->notebook; extra == "all"->ipython[all])
Requirement already satisfied: MarkupSafe in /Library/Python/2.7/site-packages (from jinja2->notebook; extra == "all"->ipython[all])
Requirement already satisfied: pytz>=0a in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from babel!=2.0,>=1.3->Sphinx>=1.3; extra == "all"->ipython[all])
Requirement already satisfied: functools32; python_version == "2.7" in /Library/Python/2.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat; extra == "all"->ipython[all])
Requirement already satisfied: configparser>=3.5; python_version == "2.7" in /Library/Python/2.7/site-packages (from entrypoints->nbconvert; extra == "all"->ipython[all])
Installing collected packages: ipywidgets, requests, babel, docutils, alabaster, snowballstemmer, imagesize, Sphinx, futures, ipyparallel, nose
  Running setup.py install for docutils ... done
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 377, in move_wheel_files
    clobber(source, dest, False, fixer=fixer, filter=filter)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/man'



RE: Help a beginner - Ofnuts - Dec-08-2016

Is there a file "/System/Library/Frameworks/Python.framework/Versions/2.7/man" and if so, what kind of access rights do you have on it (is it executable)?


RE: Help a beginner - landlord1984 - Dec-09-2016

(Dec-08-2016, 02:27 AM)landlord1984 Wrote: Hello all, After many years with C, C++ and Matlab, I have decided to learn using Python now. But my first obstacle is how to successfully install ipython on my Mac. I followed the instructions I searched but the installation seems to be failed. Below are the messages I got:
 XXXs-MacBook-Air-2:~ Lan$ sudo pip install ipython[all] The directory '/Users/Lan/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/Lan/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Requirement already satisfied: ipython[all] in /Library/Python/2.7/site-packages Requirement already satisfied: decorator in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: setuptools>=18.5 in ./Library/Python/2.7/lib/python/site-packages (from ipython[all]) Requirement already satisfied: pickleshare in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: backports.shutil-get-terminal-size; python_version == "2.7" in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: pygments in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: pexpect; sys_platform != "win32" in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: pathlib2; python_version == "2.7" or python_version == "3.3" in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: simplegeneric>0.8 in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.3 in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: traitlets>=4.2 in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: appnope; sys_platform == "darwin" in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: notebook; extra == "all" in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: ipykernel; extra == "all" in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: qtconsole; extra == "all" in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: testpath; extra == "all" in /Library/Python/2.7/site-packages (from ipython[all]) Collecting ipywidgets; extra == "all" (from ipython[all])   Downloading ipywidgets-5.2.2-py2.py3-none-any.whl (43kB)     100% |████████████████████████████████| 51kB 1.2MB/s Collecting Sphinx>=1.3; extra == "all" (from ipython[all])   Downloading Sphinx-1.5-py2.py3-none-any.whl (1.7MB)     100% |████████████████████████████████| 1.7MB 163kB/s Requirement already satisfied: nbformat; extra == "all" in /Library/Python/2.7/site-packages (from ipython[all]) Requirement already satisfied: nbconvert; extra == "all" in /Library/Python/2.7/site-packages (from ipython[all]) Collecting ipyparallel; extra == "all" (from ipython[all])   Downloading ipyparallel-5.2.0-py2.py3-none-any.whl (188kB)     100% |████████████████████████████████| 194kB 4.7MB/s Collecting requests; extra == "all" (from ipython[all])   Downloading requests-2.12.3-py2.py3-none-any.whl (575kB)     100% |████████████████████████████████| 583kB 1.3MB/s Collecting nose>=0.10.1; extra == "all" (from ipython[all])   Downloading nose-1.3.7-py2-none-any.whl (154kB)     100% |████████████████████████████████| 163kB 3.1MB/s Requirement already satisfied: numpy; extra == "all" in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from ipython[all]) Requirement already satisfied: ptyprocess>=0.5 in /Library/Python/2.7/site-packages (from pexpect; sys_platform != "win32"->ipython[all]) Requirement already satisfied: six in ./Library/Python/2.7/lib/python/site-packages (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython[all]) Requirement already satisfied: wcwidth in /Library/Python/2.7/site-packages (from prompt-toolkit<2.0.0,>=1.0.3->ipython[all]) Requirement already satisfied: enum34; python_version == "2.7" in /Library/Python/2.7/site-packages (from traitlets>=4.2->ipython[all]) Requirement already satisfied: ipython-genutils in /Library/Python/2.7/site-packages (from traitlets>=4.2->ipython[all]) Requirement already satisfied: terminado>=0.3.3; sys_platform != "win32" in /Library/Python/2.7/site-packages (from notebook; extra == "all"->ipython[all]) Requirement already satisfied: tornado>=4 in /Library/Python/2.7/site-packages (from notebook; extra == "all"->ipython[all]) Requirement already satisfied: jupyter-core in /Library/Python/2.7/site-packages (from notebook; extra == "all"->ipython[all]) Requirement already satisfied: jinja2 in /Library/Python/2.7/site-packages (from notebook; extra == "all"->ipython[all]) Requirement already satisfied: jupyter-client in /Library/Python/2.7/site-packages (from notebook; extra == "all"->ipython[all]) Requirement already satisfied: widgetsnbextension>=1.2.6 in /Library/Python/2.7/site-packages (from ipywidgets; extra == "all"->ipython[all]) Collecting babel!=2.0,>=1.3 (from Sphinx>=1.3; extra == "all"->ipython[all])   Downloading Babel-2.3.4-py2.py3-none-any.whl (7.1MB)     100% |████████████████████████████████| 7.1MB 125kB/s Collecting docutils>=0.11 (from Sphinx>=1.3; extra == "all"->ipython[all])   Downloading docutils-0.12.tar.gz (1.6MB)     100% |████████████████████████████████| 1.6MB 526kB/s Collecting alabaster<0.8,>=0.7 (from Sphinx>=1.3; extra == "all"->ipython[all])   Downloading alabaster-0.7.9-py2.py3-none-any.whl Collecting snowballstemmer>=1.1 (from Sphinx>=1.3; extra == "all"->ipython[all])   Downloading snowballstemmer-1.2.1-py2.py3-none-any.whl (64kB)     100% |████████████████████████████████| 71kB 2.8MB/s Collecting imagesize (from Sphinx>=1.3; extra == "all"->ipython[all])   Downloading imagesize-0.7.1-py2.py3-none-any.whl Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /Library/Python/2.7/site-packages (from nbformat; extra == "all"->ipython[all]) Requirement already satisfied: entrypoints in /Library/Python/2.7/site-packages (from nbconvert; extra == "all"->ipython[all]) Requirement already satisfied: mistune!=0.6 in /Library/Python/2.7/site-packages (from nbconvert; extra == "all"->ipython[all]) Requirement already satisfied: pyzmq>=13 in /Library/Python/2.7/site-packages (from ipyparallel; extra == "all"->ipython[all]) Collecting futures; python_version == "2.7" (from ipyparallel; extra == "all"->ipython[all])   Downloading futures-3.0.5-py2-none-any.whl Requirement already satisfied: singledispatch in /Library/Python/2.7/site-packages (from tornado>=4->notebook; extra == "all"->ipython[all]) Requirement already satisfied: certifi in /Library/Python/2.7/site-packages (from tornado>=4->notebook; extra == "all"->ipython[all]) Requirement already satisfied: backports_abc>=0.4 in /Library/Python/2.7/site-packages (from tornado>=4->notebook; extra == "all"->ipython[all]) Requirement already satisfied: MarkupSafe in /Library/Python/2.7/site-packages (from jinja2->notebook; extra == "all"->ipython[all]) Requirement already satisfied: pytz>=0a in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from babel!=2.0,>=1.3->Sphinx>=1.3; extra == "all"->ipython[all]) Requirement already satisfied: functools32; python_version == "2.7" in /Library/Python/2.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat; extra == "all"->ipython[all]) Requirement already satisfied: configparser>=3.5; python_version == "2.7" in /Library/Python/2.7/site-packages (from entrypoints->nbconvert; extra == "all"->ipython[all]) Installing collected packages: ipywidgets, requests, babel, docutils, alabaster, snowballstemmer, imagesize, Sphinx, futures, ipyparallel, nose   Running setup.py install for docutils ... done Exception: Traceback (most recent call last):   File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main     status = self.run(options, args)   File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run     prefix=options.prefix_path,   File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install     **kwargs   File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install     self.move_wheel_files(self.source_dir, root=root, prefix=prefix)   File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files     isolated=self.isolated,   File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 377, in move_wheel_files     clobber(source, dest, False, fixer=fixer, filter=filter)   File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 316, in clobber     ensure_dir(destdir)   File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 83, in ensure_dir     os.makedirs(path)   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs     makedirs(head, mode)   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs     mkdir(name, mode) OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/man'
(Dec-08-2016, 10:36 PM)Ofnuts Wrote: Is there a file "/System/Library/Frameworks/Python.framework/Versions/2.7/man" and if so, what kind of access rights do you have on it (is it executable)?

I just check. No such file"/System/Library/Frameworks/Python.framework/Versions/2.7/man". This is my personal Mac.


RE: install ipython on Mac - Kebap - Dec-09-2016

(Dec-08-2016, 02:27 AM)landlord1984 Wrote: I followed the instructions I searched but the installation seems to be failed.

Welcome to python and the forums! Would you care to show these instructions?


RE: install ipython on Mac - landlord1984 - Dec-09-2016

(Dec-09-2016, 11:15 AM)Kebap Wrote:
(Dec-08-2016, 02:27 AM)landlord1984 Wrote: I followed the instructions I searched but the installation seems to be failed.
Welcome to python and the forums! Would you care to show these instructions?

Thanks for the helps. I am struggling. I really want to make my first "Hello World" works by using ipython.

The command I typed to install is "sudo pip install ipython[all]".

Or it there any else can do the similar things as ipython? What do you use when you play python?

Thanks,
L


RE: install ipython on Mac - nilamo - Dec-09-2016

I just use a text editor. Notepad++ to be specific. You have experience programming already... what editor do you normally use? There's a (probably pretty good) chance that someone made a plugin for python for that editor already.


RE: install ipython on Mac - landlord1984 - Dec-11-2016

(Dec-09-2016, 09:01 PM)nilamo Wrote: Notepad++

I have used Notepad++for C++ codes and sometimes used Xcode. I just learned that ipython is something good to use for python. But no clue why there is a problem to install on my Mac.

Thanks for the advice. I will have a try.

L

(Dec-11-2016, 05:00 AM)landlord1984 Wrote:
(Dec-09-2016, 09:01 PM)nilamo Wrote: Notepad++
I have used Notepad++for C++ codes and sometimes used Xcode. I just learned that ipython is something good to use for python. But no clue why there is a problem to install on my Mac. Thanks for the advice. I will have a try. L

Interesting. I restarted my computer and now I can use ipython!!!