{"id":210,"date":"2011-01-13T22:47:14","date_gmt":"2011-01-13T21:47:14","guid":{"rendered":"http:\/\/daniel.hepper.net\/blog\/?p=210"},"modified":"2011-01-13T22:47:14","modified_gmt":"2011-01-13T21:47:14","slug":"using-python-packages-an-overview","status":"publish","type":"post","link":"https:\/\/daniel.hepper.net\/blog\/2011\/01\/using-python-packages-an-overview\/","title":{"rendered":"Using Python Packages &#8211; An Overview"},"content":{"rendered":"<p>Yesterday I gave a presentation at <a href=\"http:\/\/pycologne.de\">PyCologne<\/a> about Python packages. It was meant as a kind of sequel to the <a href=\"http:\/\/chrisarndt.de\/talks\/cooking-eggs\/cooking-eggs-vortrag.html\">&#8220;Cooking Eggs&#8221; talk given by Christopher Arndt (in German)<\/a> in September. While he presented ways to create Python packages, I focused on how to use Python packages.<\/p>\n<p>Python comes with batteries included, but sometimes, battery power is not enough. Thankfully, there are countless packages available for use. Given that there &#8220;<a href=\"http:\/\/www.python.org\/dev\/peps\/pep-0020\/\">should be one&#8211; and preferably only one &#8211;obvious way to do it<\/a>,&#8221; using Python packages can be quite intimidating. The documentation of your package might say to download, unzip und run <code>python setup.py install<\/code>. Meet distutils. Or just do <code>easy_install MyPackage<\/code>, which is uses <a href=\"http:\/\/pypi.python.org\/pypi\/setuptools\">setuptools<\/a>. But then you <a href=\"http:\/\/guide.python-distribute.org\/introduction.html#current-state-of-packaging\">hear<\/a> that setuptools is superseeded by <a href=\"http:\/\/packages.python.org\/distribute\/\">distribute<\/a> and instead of <code>easy_install<\/code>, you should use <code><a href=\"http:\/\/pip.openplans.org\/\">pip<\/a><\/code>. And then there is <code><a href=\"http:\/\/virtualenv.openplans.org\/\">virtualenv<\/a><\/code>, which is awesome, but can be even more awesome with <code><a href=\"http:\/\/www.doughellmann.com\/projects\/virtualenvwrapper\/\">virtualenvwrapper<\/a><\/code>. What a mess! <\/p>\n<p>My conclusion: use <code><a href=\"http:\/\/packages.python.org\/distribute\/\">distribute<\/a><\/code>, <code><a href=\"http:\/\/pip.openplans.org\/\">pip<\/a><\/code>, <code><a href=\"http:\/\/virtualenv.openplans.org\/\">virtualenv<\/a><\/code> and <code><a href=\"http:\/\/www.doughellmann.com\/projects\/virtualenvwrapper\/\">virtualenvwrapper<\/a><\/code>.<\/p>\n<p>You can <a href='http:\/\/daniel.hepper.net\/blog\/wp-content\/python_packages_pycologne.pdf'>download the slides<\/a> or view them with Slideshare:<\/p>\n<div style=\"width:425px\" id=\"__ss_6553097\"><strong style=\"display:block;margin:12px 0 4px\"><a href=\"http:\/\/www.slideshare.net\/danielhepper\/using-python-packages-an-overview\" title=\"Using Python Packages - An Overview\">Using Python Packages &#8211; An Overview<\/a><\/strong><object id=\"__sse6553097\" width=\"425\" height=\"355\"><param name=\"movie\" value=\"http:\/\/static.slidesharecdn.com\/swf\/ssplayer2.swf?doc=pythonpackagespycologne-110113151547-phpapp01&#038;rel=0&#038;stripped_title=using-python-packages-an-overview&#038;userName=danielhepper\" \/><param name=\"allowFullScreen\" value=\"true\"\/><param name=\"allowScriptAccess\" value=\"always\"\/><embed name=\"__sse6553097\" src=\"http:\/\/static.slidesharecdn.com\/swf\/ssplayer2.swf?doc=pythonpackagespycologne-110113151547-phpapp01&#038;rel=0&#038;stripped_title=using-python-packages-an-overview&#038;userName=danielhepper\" type=\"application\/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"355\"><\/embed><\/object><\/p>\n<div style=\"padding:5px 0 12px\">View more <a href=\"http:\/\/www.slideshare.net\/\">presentations<\/a> from <a href=\"http:\/\/www.slideshare.net\/danielhepper\">danielhepper<\/a>.<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I gave a presentation at PyCologne about Python packages. It was meant as a kind of sequel to the &#8220;Cooking Eggs&#8221; talk given by Christopher Arndt (in German) in September. While he presented ways to create Python packages, I &hellip; <a href=\"https:\/\/daniel.hepper.net\/blog\/2011\/01\/using-python-packages-an-overview\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[35],"tags":[23,25,5,24],"class_list":["post-210","post","type-post","status-publish","format-standard","hentry","category-python","tag-packaging","tag-pycologne","tag-python","tag-talk"],"_links":{"self":[{"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/posts\/210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/comments?post=210"}],"version-history":[{"count":4,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/posts\/210\/revisions"}],"predecessor-version":[{"id":215,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/posts\/210\/revisions\/215"}],"wp:attachment":[{"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/media?parent=210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/categories?post=210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/tags?post=210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}