python初心者です。  
Python2.7を用いています。  
`pip install jupyter`を行うとエラーが出ます。  
原因と対策を教えていただけませんでしょうか。  
なお、最後に出て来たエラーの`pip install --upgrade pip`を行った場合も、Exception以下と同様のエラーが出てしまいました。

こちらと同じ問題で、pythonをアップデートすれば良いのでしょうか？  
<https://ja.stackoverflow.com/questions/13161/pip-install-
greenlet%E3%81%A7failed-building-wheel-for-
greenlet%E3%82%A8%E3%83%A9%E3%83%BC>

```

      Building wheels for collected packages: tornado, terminado, backports.ssl-match-hostname, pyzmq, MarkupSafe, simplegeneric, configparser, functools3 
      Running setup.py bdist_wheel for tornad
      The complete output from command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/pip-build-QH4YZE/tornado/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/tmpDp48uXpip-wheel-:
      usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: -c --help [cmd1 cmd2 ...]
         or: -c --help-commands
         or: -c cmd --help
    
      error: invalid command 'bdist_wheel'
    
      ----------------------------------------
      Failed building wheel for tornado
      Running setup.py bdist_wheel for terminado
      Complete output from command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/pip-build-QH4YZE/terminado/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/tmpMu9bLIpip-wheel-:
      usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: -c --help [cmd1 cmd2 ...]
         or: -c --help-commands
         or: -c cmd --help
    
      error: invalid command 'bdist_wheel'
    
      ----------------------------------------
      Failed building wheel for terminado
      Running setup.py bdist_wheel for backports.ssl-match-hostname
      Complete output from command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/pip-build-QH4YZE/backports.ssl-match-hostname/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/tmpx64YqIpip-wheel-:
      usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: -c --help [cmd1 cmd2 ...]
         or: -c --help-commands
         or: -c cmd --help
    
      error: invalid command 'bdist_wheel'
    
      ----------------------------------------
      Failed building wheel for backports.ssl-match-hostname
      Running setup.py bdist_wheel for pyzmq
      Complete output from command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/pip-build-QH4YZE/pyzmq/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/tmpCtgvTWpip-wheel-:
      usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: -c --help [cmd1 cmd2 ...]
         or: -c --help-commands
         or: -c cmd --help
    
      error: invalid command 'bdist_wheel'
    
      ----------------------------------------
      Failed building wheel for pyzmq
      Running setup.py bdist_wheel for MarkupSafe
      Complete output from command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/pip-build-QH4YZE/MarkupSafe/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/tmp9EeIuQpip-wheel-:
      usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: -c --help [cmd1 cmd2 ...]
         or: -c --help-commands
         or: -c cmd --help
    
      error: invalid command 'bdist_wheel'
    
      ----------------------------------------
      Failed building wheel for MarkupSafe
      Running setup.py bdist_wheel for simplegeneric
      Complete output from command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/pip-build-QH4YZE/simplegeneric/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/tmpPTzKuwpip-wheel-:
      usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: -c --help [cmd1 cmd2 ...]
         or: -c --help-commands
         or: -c cmd --help
    
      error: invalid command 'bdist_wheel'
    
      ----------------------------------------
      Failed building wheel for simplegeneric
      Running setup.py bdist_wheel for configparser
      Complete output from command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/pip-build-QH4YZE/configparser/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/tmpkuQxjLpip-wheel-:
      usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: -c --help [cmd1 cmd2 ...]
         or: -c --help-commands
         or: -c cmd --help
    
      error: invalid command 'bdist_wheel'
    
      ----------------------------------------
      Failed building wheel for configparser
      Running setup.py bdist_wheel for functools32
      Complete output from command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/pip-build-QH4YZE/functools32/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/fp/yp0fw0cd3v5b6swc29dmxx2h0000gn/T/tmpPFjzxnpip-wheel-:
      usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: -c --help [cmd1 cmd2 ...]
         or: -c --help-commands
         or: -c cmd --help
    
      error: invalid command 'bdist_wheel'
    
      ----------------------------------------
      Failed building wheel for functools32
    Failed to build tornado terminado backports.ssl-match-hostname pyzmq MarkupSafe simplegeneric configparser functools32
    Installing collected packages: decorator, ipython-genutils, traitlets, backports.ssl-match-hostname, singledispatch, certifi, backports-abc, tornado, jupyter-core, pyzmq, jupyter-client, functools32, jsonschema, nbformat, pygments, mistune, MarkupSafe, jinja2, configparser, entrypoints, nbconvert, pathlib2, pickleshare, simplegeneric, appnope, backports.shutil-get-terminal-size, setuptools, ptyprocess, pexpect, wcwidth, prompt-toolkit, ipython, ipykernel, terminado, notebook, widgetsnbextension, ipywidgets, jupyter-console, qtconsole, jupyter
    Exception:
    Traceback (most recent call last):
      File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 211, in main
        status = self.run(options, args)
      File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 311, in run
        root=options.root_path,
      File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 646, in install
        **kwargs
      File "/Library/Python/2.7/site-packages/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/req/req_install.py", line 998, in move_wheel_files
        isolated=self.isolated,
      File "/Library/Python/2.7/site-packages/pip/wheel.py", line 339, in move_wheel_files
        clobber(source, lib_dir, True)
      File "/Library/Python/2.7/site-packages/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'
    You are using pip version 7.1.2, however version 8.1.2 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    
```
CC BY-SA 3.0
2016-07-27T19:05:08.893
27899
2016-07-28T02:43:49.350
2017-04-13T12:52:39.113
-1
17264
question
python macos
Python2.7　pip install jupyter　でエラーになる
> IOError: [Errno 13] Permission denied:  
>  '/Library/Python/2.7/site-packages/decorator.py'

これは権限の問題ですね。  
Macでどの様にPython環境を管理されているか分かりませんが、一般に管理者権限でコマンドを実行する際は、`sudo`を使います。

```

    sudo pip install spam
    
```

のように実行します。

管理者権限でシステム共通の場所にインストールするのではなく、ユーザのホームディレクトリなどにインストールしたい場合は、`--user`オプションを使います。

```

    pip install --user spam 
    
```

手元で確認はしていませんが、権限の問題は上記のどちらかで解決するのではないでしょうか。

> error: invalid command 'bdist_wheel'

このエラーは、

```

    pip install wheel
    
```

で`wheel`をインストールすればよさそうです。
CC BY-SA 3.0
2016-07-28T02:43:49.350
27902
2016-07-28T02:43:49.350
3054
27899
answer