{"id":8682,"date":"2015-01-20T00:42:42","date_gmt":"2015-01-20T00:42:42","guid":{"rendered":"https:\/\/wp.okra.host\/article\/installing-packages\/"},"modified":"2021-03-07T14:44:26","modified_gmt":"2021-03-07T13:44:26","slug":"installing-packages","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/installing-packages\/","title":{"rendered":"Installieren von Paketen"},"content":{"rendered":"<h2 id=\"overview\" >Overview<\/h2>\n<p>Python uses a package management system called &#8220;<a href=\"https:\/\/pypi.python.org\/pypi\/pip\">pip<\/a>&#8220;. Package management is available on newer hosting platforms <a title=\"Determining platform version\" href=\"https:\/\/kb.okra.host\/platform\/determining-platform-version\/\">v4.5<\/a> and above. <a title=\"Is terminal access available?\" href=\"https:\/\/kb.okra.host\/terminal\/is-terminal-access-available\/\">Terminal access<\/a> is necessary to use the feature.<\/p>\n<h2 id=\"package-management\" >Package management<\/h2>\n<p>All packages installed reside under \/usr\/local\/lib\/python\/<em>&lt;VERSION&gt;\u00a0<\/em>where\u00a0<em>&lt;VERSION&gt;<\/em> is the\u00a0Python version. Python versions may be switched on-the-fly using <a title=\"Changing Python versions\" href=\"https:\/\/kb.okra.host\/python\/changing-python-versions\/\">pyenv<\/a>\u00a0on <a title=\"Determining platform version\" href=\"https:\/\/kb.okra.host\/platform\/determining-platform-version\/\">v6 platforms<\/a>.<\/p>\n<p><span style=\"color: #0000ff\"><strong>Important platform\u00a0info:\u00a0<\/strong><span style=\"color: #000000\">all commands listed here use\u00a0<code>pip<\/code>. On older platforms, <em>pre-v6<\/em>, use <code>pip-python<\/code> instead of <code>pip<\/code> to install packages. Syntax remains otherwise the same.<\/span><\/span><\/p>\n<h3 id=\"installing-packages\" >Installing packages<\/h3>\n<p>Use <code>pip-python install PKGNAME<\/code> where PKGNAME is a package name listed in <a href=\"https:\/\/pypi.python.org\/pypi\">Python Package Index<\/a>.<\/p>\n<p>To install Django: <code>pip install django<\/code><\/p>\n<figure class=\"terminal\" style=\"width: 550px\">\n<div class=\"terminal\">\n<div class=\"terminal-text\"><code><code>[myuser@sol ~]$ pip install django<br \/>\nDownloading\/unpacking django<br \/>\nRunning setup.py egg_info for package django<\/code><\/code>warning: no previously-included files matching &#8216;__pycache__&#8217; found under directory &#8216;*&#8217;<br \/>\nwarning: no previously-included files matching &#8216;*.py[co]&#8217; found under directory &#8216;*&#8217;<br \/>\nInstalling collected packages: django<br \/>\nRunning setup.py install for djangowarning: no previously-included files matching &#8216;__pycache__&#8217; found under directory &#8216;*&#8217;<br \/>\nwarning: no previously-included files matching &#8216;*.py[co]&#8217; found under directory &#8216;*&#8217;<br \/>\nchanging mode of \/usr\/local\/bin\/django-admin.py to 775<br \/>\nInstalling django-admin script to \/usr\/local\/bin<br \/>\nSuccessfully installed django<br \/>\nCleaning up&#8230;<\/div>\n<\/div>\n<\/figure>\n<div class=\"clear\"><\/div>\n<p>To install a Python 2.6+ package to your <a title=\"Home directory location\" href=\"https:\/\/kb.okra.host\/platform\/home-directory-location\/\">home directory<\/a>, specify <code>--user<\/code>:<\/p>\n<p><code>pip install --user django<\/code><\/p>\n<p>The package, django, will be installed under <code>~\/.local\/lib\/<\/code>.<\/p>\n<h3 id=\"listing-packages\" >Listing packages<\/h3>\n<p>To view packages locally installed, issue pip-python list. To view remote packages using basic string matching, use <code>pip-python search PKGTOKEN<\/code>, where <em>PKGTOKEN<\/em> is a partial package name to search for. You may wish to page long content by piping output to <a href=\"http:\/\/apnscp.com\/linux-man\/man1\/more.1.html\">less<\/a> as in <code>pip-python search PKGTOKEN | less<\/code>:<\/p>\n<figure class=\"terminal\" style=\"width: 550px\">\n<div class=\"terminal\">\n<div class=\"indicators\"><\/div>\n<div class=\"terminal-text\"><code><code><code>[myuser@sol ~]$\u00a0pip search django-a<\/code><\/code><\/code>django-autocomplete-light &#8211; Fresh autocompletes for Django<br \/>\ndjango-angular-scaffold &#8211; AngularJS Scaffolding for Django<br \/>\ndjango-alert &#8211; Send alerts, notifications, and messages based on events in your django application<br \/>\ndjango-admin-sortable &#8211; Drag and drop sorting for models and inline models in Django admin.<br \/>\ndjango-quickapi &#8211; The Django-application for the fast organization API.<\/div>\n<\/div>\n<\/figure>\n<h3 id=\"removing-packages\" >Removing packages<\/h3>\n<p><code>pip-python uninstall PKGNAME<\/code> where <em>PKGNAME<\/em> is a package installed and listed via <code>pip-python list<\/code>.<\/p>\n<h3 id=\"upgrading-packages\" >Upgrading packages<\/h3>\n<p><code>pip-python install --upgrade PKGNAME<\/code> where <em>PKGNAME<\/em> is the package installed and listed via <code>pip-python list<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Python uses a package management system called &#8220;pip&#8220;. Package management is available on newer hosting platforms v4.5 and above. Terminal access is necessary to use the feature. Package management All packages installed reside under \/usr\/local\/lib\/python\/&lt;VERSION&gt;\u00a0where\u00a0&lt;VERSION&gt; is the\u00a0Python version. Python versions may be switched on-the-fly using pyenv\u00a0on v6 platforms. Important&#8230;<\/p>","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-8682","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\/8682","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=8682"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8682\/revisions"}],"predecessor-version":[{"id":8683,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8682\/revisions\/8683"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8682"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8682"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}