Python Ubuntu安装Boto错误
我已经安装了Python 2.7.9,正在尝试使用pip install Boto安装Boto,但收到以下错误:Python Ubuntu安装Boto错误,python,ubuntu,pip,boto,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/dis
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。试着运行以下命令:
sudo pip install boto
首先需要安装PIP,然后安装boto库 如果您想使用boto v2,请使用
sudo apt-get install python-pip
pip install boto
如果您想安装最新、功能更强大的boto v3,请使用下面的命令
pip install boto3
如果您使用的是Python3,并且希望使用最新的pip,那么请使用以下命令
sudo apt-get install python3-pip
pip3 install boto
在命令之前尝试使用
sudo
,更好的方法是,使用virtualenv为Python项目创建一个虚拟环境,这样您就不会试图将软件包安装到系统目录中。