{"id":8669,"date":"2015-03-03T17:44:29","date_gmt":"2015-03-03T17:44:29","guid":{"rendered":"https:\/\/wp.okra.host\/article\/pip-install-fails-with-permission-denied-on-python-3\/"},"modified":"2021-03-07T14:44:11","modified_gmt":"2021-03-07T13:44:11","slug":"pip-install-fails-with-permission-denied-on-python-3","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/pip-install-fails-with-permission-denied-on-python-3\/","title":{"rendered":"pip install schl\u00e4gt mit \"Permission denied\" auf Python 3+ fehl"},"content":{"rendered":"<h2 id=\"overview\" >Overview<\/h2>\n<p>Python&#8217;s integrated <a title=\"Installing packages\" href=\"https:\/\/kb.okra.host\/python\/installing-packages\/\">package manager,<\/a> pip, fails to install packages when Python 3.0 and above is used raising a PermissionError. Below is an abbreviated sample output:<\/p>\n<pre>[myadmin@sol]$ pip install django\r\nDownloading\/unpacking django\r\nInstalling collected packages: django\r\nCleaning up...\r\nException:\r\nTraceback (most recent call last):\r\n File \"\/.socket\/python\/python3.4\/site-packages\/pip\/wheel.py\", line 205, in clobber\r\n os.makedirs(destdir)\r\n File \"\/.socket\/python\/python3.4\/os.py\", line 237, in makedirs\r\n mkdir(name, mode)\r\nPermissionError: [Errno 13] Permission denied: '\/.socket\/python\/python3.4\/site-packages\/django'<\/pre>\n<h2 id=\"cause\" >Cause<\/h2>\n<p>pip bundled with Python 3.0 and above include support for <a href=\"https:\/\/wheel.readthedocs.org\/en\/latest\/\">wheel<\/a>, a successor to an earlier package format, <a href=\"http:\/\/pythonhosted.org\/setuptools\/formats.html\">egg<\/a>. wheel\u00a0is called after package installation\u00a0without exposing custom configuration. wheel, unaware that libraries are installed to version-specific directories, tries to install in the system Python location unsuccessfully.<\/p>\n<h2 id=\"solution\" >Solution<\/h2>\n<p>Disable wheel processing with\u00a0<code>--no-use-wheel<\/code>\u00a0as an argument to <code>pip install<\/code> or add the following configuration within <code>~\/.pip\/pip.conf<\/code>, inside your\u00a0<a href=\"https:\/\/kb.okra.host\/platform\/home-directory-location\/\">home directory<\/a>:<\/p>\n<pre>[global]\r\nuse-wheel = no<\/pre>\n<p>Most accounts should have wheel disabled\u00a0by default.<\/p>\n<h2 id=\"see-also\" >See also<\/h2>\n<ul>\n<li>\n<p class=\"gh-header-title\"><a href=\"https:\/\/github.com\/pypa\/pip\/issues\/1716\"><span class=\"js-issue-title\">`&#8211;install-option` should work for wheels?<\/span> <span class=\"gh-header-number\">#1716<\/span><\/a><\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Overview Python&#8217;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&#8230; Exception: Traceback (most recent call last): File &#8220;\/.socket\/python\/python3.4\/site-packages\/pip\/wheel.py&#8221;, line 205, in clobber&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[65],"ht-kb-tag":[],"class_list":["post-8669","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-python"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8669"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8669\/revisions"}],"predecessor-version":[{"id":8670,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8669\/revisions\/8670"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8669"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8669"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}