pip install fails with “Permission denied” on Python 3+


Python’s integrated package manager, pip, fails to install packages when Python 3.0 and above is used raising a PermissionError. Below is an abbreviated sample output:

[myadmin@sol]$ pip install django
Downloading/unpacking django
Installing collected packages: django
Cleaning up...
Traceback (most recent call last):
 File "/.socket/python/python3.4/site-packages/pip/wheel.py", line 205, in clobber
 File "/.socket/python/python3.4/os.py", line 237, in makedirs
 mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/.socket/python/python3.4/site-packages/django'


pip bundled with Python 3.0 and above include support for wheel, a successor to an earlier package format, egg. wheel is called after package installation without exposing custom configuration. wheel, unaware that libraries are installed to version-specific directories, tries to install in the system Python location unsuccessfully.


Disable wheel processing with --no-use-wheel as an argument to pip install or add the following configuration within ~/.pip/pip.conf, inside your home directory:

use-wheel = no

Most accounts should have wheel disabled by default.

See also

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.