0

I'm using linux mint and logged in as administrator. I have used pip to install packages before, but now whatever I try to install, i get this Error

Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 671, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 901, in move_wheel_files
    pycompile=self.pycompile,
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/wheel.py", line 215, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/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/IPython'

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

What could be the problem?

T90
  • 567
  • 6
  • 27
  • 3
    use `sudo pip install` – Leon Nov 20 '14 at 11:50
  • 2
    Even if I'm logged in as an administrator? It used to work without sudo earlier, but anyway for now, it works with sudo added, Thanks. – T90 Nov 20 '14 at 12:32
  • Sorry, I missed that bit of information... even though it is the first statement :D – Leon Nov 20 '14 at 12:38
  • 3
    There's a difference between "Administrator" and root. My guess is you have a user account on your machine named "Administrator" that has some elevated rights, but still does not have the same rights as root. Like @Leon said, use sudo. – Oliver W. Nov 20 '14 at 12:48
  • DO NOT USE `sudo` WITH `pip`! We need to actually do something about this terrible piece of advice that you see on basically every answer relating to package managers. Instead you should look at [this post here](https://stackoverflow.com/a/42021993/3072027) if you want to know why not and what you should do instead. – bert Nov 23 '17 at 12:28

0 Answers0