Saturday 15 May 2010

pip - How to do Python package management? -



pip - How to do Python package management? -

coming node.js + npm background, nightmarish trying understand things related python bundle management. after few hours of research, i've stumbled upon keywords:

easy_install virtualenv pip setuptools distutils pypi wheel egg site-packages

can help me decipher terms , set them in historical context? example, "distutils first bundle manager superseded x in y because z".

i absolutely love python (the language) bundle management seems real nightmare larn has been using amazing npm lastly few years.

types of packages egg vs wheel vs neither. what's meant neither python bundle can installed "source" without beingness packaged egg or wheel.

packaging utilities there several libraries provide utilities packaging python applications, including distutils , setuptools. there excellent post on this.

easy_install part of setuptools, allows building , installing python packages. discouraged in favor of pip. designed create installation of packages easy, doing chore of downloading , moving them right place (hence name).

pip bundle manager python packages, , replacement easy_install! see here reasons why people prefer on easy_install. can neat things install bundle straight git repository or compile c extensions on target machine. latter debatable whether or not it's desirable, nonetheless it's nice feature have if want it.

pypi python bundle index, easy_install , pip search available packages, default. giant online repository of modules accepted community.

virtualenv way of hacking environment variables "isolate" installation of python , it's related modules. prefers pip, because ian bicking wrote them both. basically, utilize pip install virtualenv scheme wide, allows create python virtual environments, each own re-create of python, pip, , assorted modules. lets have multiple versions of python or install module testing, without mucking system-wide python install.

virtualenvwrapper handy shell script makes creating , tearing downwards virtual environments easier.

site-packages 1 of supported locations installing python modules into. lives someplace /usr/lib/pythonx.x/site-packages. there other supported locations, dist-packages or user specific locations.

what mean you? i'd recommend don't pay attending easy_install , utilize pip. please utilize virtualenv. usually, python modules should install system-wide on workstation pip , virtualenv. i've ignored eggs , wheels, if plan distribute packages professionally or host them on pypi, want investigate those. also, if creating python packages, need learn write setup script, setuptools. recommendation never utilize distutils.

some more reading a page on python.org packaging covers lot of these topics python packaging is nightmare a great post goes against mutual recommendations, including mine!

python pip virtualenv

No comments:

Post a Comment