我想知道如何在我的mac中安装ipython笔记本

时间:2015-12-17 06:06:55

标签: python ipython

我在我的mac中安装了python。但是当我尝试使用pip install ipython notebook安装ipython笔记本时,它会引发异常。我是python的初学者。这是我在尝试安装ipython notebook

时得到的
pip install ipython notebook
Collecting ipython
  Using cached ipython-4.0.1-py2-none-any.whl
Collecting notebook
  Downloading notebook-4.0.6-py2.py3-none-any.whl (5.6MB)
    100% |████████████████████████████████| 5.6MB 102kB/s 
Collecting traitlets (from ipython)
  Using cached traitlets-4.0.0-py2.py3-none-any.whl
Collecting pickleshare (from ipython)
  Using cached pickleshare-0.5.tar.gz
Collecting simplegeneric>0.8 (from ipython)
  Using cached simplegeneric-0.8.1.zip
Collecting decorator (from ipython)
  Using cached decorator-4.0.6-py2.py3-none-any.whl
Collecting gnureadline (from ipython)
  Using cached gnureadline-6.3.3-cp27-none-macosx_10_6_intel.whl
Collecting appnope (from ipython)
  Using cached appnope-0.1.0-py2.py3-none-any.whl
Collecting pexpect (from ipython)
  Using cached pexpect-4.0.1.tar.gz
Collecting tornado>=4 (from notebook)
  Downloading tornado-4.3.tar.gz (450kB)
    100% |████████████████████████████████| 454kB 68kB/s 
Collecting jupyter-client (from notebook)
  Downloading jupyter_client-4.1.1-py2.py3-none-any.whl (70kB)
    100% |████████████████████████████████| 73kB 66kB/s 
Collecting nbformat (from notebook)`enter code here`
  Downloading nbformat-4.0.1-py2.py3-none-any.whl (138kB)
    100% |████████████████████████████████| 139kB 66kB/s 
Collecting jupyter-core (from notebook)
  Downloading jupyter_core-4.0.6-py2.py3-none-any.whl (74kB)
    100% |████████████████████████████████| 77kB 4.1MB/s 
Collecting jinja2 (from notebook)
  Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB)
    100% |████████████████████████████████| 266kB 66kB/s 
Collecting ipykernel (from notebook)
  Downloading ipykernel-4.2.1-py2.py3-none-any.whl (90kB)
    100% |████████████████████████████████| 94kB 4.0MB/s 
Collecting terminado>=0.3.3 (from notebook)
  Downloading terminado-0.5.tar.gz
Collecting ipython-genutils (from notebook)
  Using cached ipython_genutils-0.1.0-py2.py3-none-any.whl
Collecting nbconvert (from notebook)
  Downloading nbconvert-4.1.0-py2.py3-none-any.whl (281kB)
    100% |████████████████████████████████| 282kB 81kB/s 
Collecting path.py (from pickleshare->ipython)
  Using cached path.py-8.1.2-py2.py3-none-any.whl
Collecting ptyprocess>=0.5 (from pexpect->ipython)
  Using cached ptyprocess-0.5.tar.gz
Collecting backports.ssl-match-hostname (from tornado>=4->notebook)
  Downloading backports.ssl_match_hostname-3.4.0.2.tar.gz
Collecting singledispatch (from tornado>=4->notebook)
  Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting certifi (from tornado>=4->notebook)
  Downloading certifi-2015.11.20.1-py2.py3-none-any.whl (368kB)
    100% |████████████████████████████████| 372kB 919kB/s 
Collecting backports-abc>=0.4 (from tornado>=4->notebook)
  Downloading backports_abc-0.4-py2.py3-none-any.whl
Collecting pyzmq>=13 (from jupyter-client->notebook)
  Downloading pyzmq-15.1.0-cp27-none-macosx_10_6_intel.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 30kB/s 
Collecting jsonschema!=2.5.0,>=2.0 (from nbformat->notebook)
  Downloading jsonschema-2.5.1-py2.py3-none-any.whl
Collecting MarkupSafe (from jinja2->notebook)
  Downloading MarkupSafe-0.23.tar.gz
Collecting pygments (from nbconvert->notebook)
  Downloading Pygments-2.0.2-py2-none-any.whl (672kB)
    100% |████████████████████████████████| 675kB 729kB/s 
Collecting mistune!=0.6 (from nbconvert->notebook)
  Downloading mistune-0.7.1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (418kB)
    100% |████████████████████████████████| 421kB 32kB/s 
Requirement already satisfied (use --upgrade to upgrade): six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from singledispatch->tornado>=4->notebook)
Collecting functools32 (from jsonschema!=2.5.0,>=2.0->nbformat->notebook)
  Downloading functools32-3.2.3-2.tar.gz
Installing collected packages: decorator, ipython-genutils, traitlets, path.py, pickleshare, simplegeneric, gnureadline, appnope, ptyprocess, pexpect, ipython, backports.ssl-match-hostname, singledispatch, certifi, backports-abc, tornado, jupyter-core, pyzmq, jupyter-client, functools32, jsonschema, nbformat, MarkupSafe, jinja2, ipykernel, terminado, pygments, mistune, nbconvert, notebook
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 646, in install
    **kwargs
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 803, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 998, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", line 339, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", line 317, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/decorator.py'

1 个答案:

答案 0 :(得分:1)

这看起来像是一个权限问题 - 虽然不是Mac用户,但我认为你可以通过简单地使用来解决这个问题:

sudo pip install ipython notebook