无法在ipython笔记本上安装pip

时间:2015-10-21 08:53:55

标签: python ipython-notebook

我是Stackoverflow和编程方面的新手..

我必须安装pip,但我有一个错误,我无法解决。

我在其他论坛和这里搜索过,但我找不到任何东西。 我在Ubuntu 14.02和python 2.7.6

输入!pip install yapf

时出现错误

感谢您的帮助:)

Downloading/unpacking yapf
  Downloading yapf-0.6.0-py2.py3-none-any.whl (118kB): 118kB downloaded
Installing collected packages: yapf
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 672, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 902, in move_wheel_files
    pycompile=self.pycompile,
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 206, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 193, in clobber
    os.makedirs(destsubdir)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/yapftests'

Storing debug log for failure in /home/luis/.pip/pip.log

1 个答案:

答案 0 :(得分:0)

尝试与root或sudo

相同