2017-05-29 3 views
0

エラーを取得し、Mac上でpip install tornadoを使用してください:闘いの後はエラーが出る `ピップは、Mac上でtornado`インストールし使用します。アクセス許可が拒否されました:「/Library/Python/2.7/site-packages/singledispatch.py​​

aircraftdeMacBook-Pro:~ ldl$ pip install tornado 
Collecting tornado 
    Downloading tornado-4.5.1.tar.gz (483kB) 
    100% |████████████████████████████████| 491kB 565kB/s 
Collecting singledispatch (from tornado) 
    Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl 
Collecting certifi (from tornado) 
    Downloading certifi-2017.4.17-py2.py3-none-any.whl (375kB) 
    100% |████████████████████████████████| 378kB 565kB/s 
Collecting backports_abc>=0.4 (from tornado) 
    Downloading backports_abc-0.5-py2.py3-none-any.whl 
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from singledispatch->tornado) 
Installing collected packages: singledispatch, certifi, backports-abc, tornado 
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 345, in move_wheel_files 
    clobber(source, lib_dir, True) 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 323, 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/singledispatch.py' 

答えて

0

を、私はそれを解決したsudo pip install tornadoを使用します。一般的に

Collecting tornado 
    Downloading tornado-4.5.1.tar.gz (483kB) 
    100% |████████████████████████████████| 491kB 557kB/s 
Collecting singledispatch (from tornado) 
    Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl 
Collecting certifi (from tornado) 
    Downloading certifi-2017.4.17-py2.py3-none-any.whl (375kB) 
    100% |████████████████████████████████| 378kB 641kB/s 
Collecting backports_abc>=0.4 (from tornado) 
    Downloading backports_abc-0.5-py2.py3-none-any.whl 
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from singledispatch->tornado) 
Installing collected packages: singledispatch, certifi, backports-abc, tornado 
    Running setup.py install for tornado ... done 
Successfully installed backports-abc-0.5 certifi-2017.4.17 singledispatch-3.4.0.3 tornado-4.5.1 
1

命令が言うとき、:時間の

To install package123 run pip install package123

99%を、(virtualenvまたはvenv経由)パッケージには、Pythonの仮想環境にインストールされていることを想定しています。そう言えば、仮想環境にTornadoをインストールし、sudo pip install tornadoを避けるべきです。サードパーティのモジュールでシステムパッケージの汚染以外のsudoを使用すると、悪いことはありません。

関連する問題