Ubuntu安装Boto错误

时间:2015-03-06 23:34:47

标签: python ubuntu pip boto

我已经安装了Python 2.7.9,我正在尝试使用pip install boto安装Boto,但是我收到了这个错误:

    Collecting boto
  Using cached boto-2.36.0-py2.py3-none-any.whl
Installing collected packages: boto

  Exception:
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 232, in main
      status = self.run(options, args)
    File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 347, in run
      root=options.root_path,
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 549, in install
      **kwargs
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 754, in install
      self.move_wheel_files(self.source_dir, root=root)
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 963, in move_wheel_files
      isolated=self.isolated,
    File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 234, in move_wheel_files
      clobber(source, lib_dir, True)
    File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 205, in clobber
      os.makedirs(destdir)
    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/boto'

我是第一次使用Linux / Ubuntu用户。

2 个答案:

答案 0 :(得分:2)

尝试运行命令,如下所示:

    sudo pip install boto

答案 1 :(得分:0)

首先,您需要安装PIP然后安装boto库

如果您想使用boto v2,请使用

sudo apt-get install python-pip
pip install boto

如果您想安装最新且功能更强大的boto v3,请使用以下命令

pip install boto3

如果您使用的是Python 3并希望使用最新的pip,请使用以下命令

sudo apt-get install python3-pip
pip3 install boto