1

I am trying to install packages via pip. Here some information:

OS = Ubuntu 15.10
python --version = 2.7.10
pip --version = pip 8.0.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)

So far I have tried with scikit-learn, pyqrcode, and numpy using pip command, none of them was successfully installed. For example with numpy:

pip install numpy

The output is:

Collecting numpy
  Downloading numpy-1.10.4.tar.gz (4.1MB)
    100% |████████████████████████████████| 4.1MB 137kB/s 
Building wheels for collected packages: numpy
Running setup.py bdist_wheel for numpy ... done
Stored in directory: /home/diego/.cache/pip/wheels/66/f5    /d7/f6ddd78b61037fcb51a3e32c9cd276e292343cdd62d5384efd
Successfully built numpy
Installing collected packages: numpy
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 731, in install
    **kwargs
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 841, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 1040, in move_wheel_files
isolated=self.isolated,
File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 343, in move_wheel_files
    clobber(source, lib_dir, True)
File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 314, in clobber
ensure_dir(destdir)
File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 82, in ensure_dir
os.makedirs(path)
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/numpy-1.10.4.dist-info'

Any help? thank you

diegus
  • 487

1 Answers1

3

Try sudo pip install numpy - you can see at the bottom of that output above a 'permission denied' which tells you that your login doesn't have authority to do it, so adopting sudo extra powers fixes it.