Error when I try to " pip install tweepy"


Hi, I would like to use the Tweepy API ( to read twitter, but if I try to install it , I get this error

1.- I download the API and Upload to my workspace
2.- I run --> pip install tweepy

but I get this error. Am I doing something wrong??

Can you help me pleae? Thanks

pocmns:~/workspace (master) $ pip install tweepy
Downloading/unpacking tweepy
Downloading tweepy-3.5.0-py2.py3-none-any.whl
Downloading/unpacking requests>=2.4.3 (from tweepy)
Downloading requests-2.13.0-py2.py3-none-any.whl (584kB): 584kB downloaded
Downloading/unpacking six>=1.7.3 (from tweepy)
Downloading six-1.10.0-py2.py3-none-any.whl
Downloading/unpacking requests-oauthlib>=0.4.1 (from tweepy)
Downloading requests_oauthlib-0.8.0-py2.py3-none-any.whl
Downloading/unpacking oauthlib>=0.6.2 (from requests-oauthlib>=0.4.1->tweepy)
Downloading oauthlib-2.0.1.tar.gz (122kB): 122kB downloaded
Running (path:/tmp/pip_build_ubuntu/oauthlib/ egg_info for package oauthlib

Installing collected packages: tweepy, requests, six, requests-oauthlib, oauthlib
Cleaning up…
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/pip/”, line 122, in main
status =, args)
File “/usr/lib/python2.7/dist-packages/pip/commands/”, line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File “/usr/lib/python2.7/dist-packages/pip/”, line 1436, in install
requirement.install(install_options, global_options, *args, **kwargs)
File “/usr/lib/python2.7/dist-packages/pip/”, line 672, in install
self.move_wheel_files(self.source_dir, root=root)
File “/usr/lib/python2.7/dist-packages/pip/”, line 902, in move_wheel_files
File “/usr/lib/python2.7/dist-packages/pip/”, line 206, in move_wheel_files
clobber(source, lib_dir, True)
File “/usr/lib/python2.7/dist-packages/pip/”, line 193, in clobber
File “/usr/lib/python2.7/”, line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: ‘/usr/local/lib/python2.7/dist-packages/tweepy-3.5.0.dist-info’

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


I reply myself…I found the solution, --> “sudo pip3 install tweepy”, worked for me!