Python setup.py develop vs install

python setup.py install is used to install (typically third party) packages that you’re not going to develop/modify/debug yourself. For your own stuff, you want to first install your package and then be able to frequently edit the code without having to re-install the package every time — and that is exactly what python setup.py develop … Read more

What’s the proper way to install pip, virtualenv, and distribute for Python?

You can do this without installing anything into python itself. You don’t need sudo or any privileges. You don’t need to edit any files. Install virtualenv into a bootstrap virtual environment. Use the that virtual environment to create more. Since virtualenv ships with pip and distribute, you get everything from one install. Download virtualenv: http://pypi.python.org/pypi/virtualenv … Read more

Differences between distribute, distutils, setuptools and distutils2?

As of May 2022, most of the other answers to this question are several years out-of-date. When you come across advice on Python packaging issues, remember to look at the date of publication, and don’t trust out-of-date information. The Python Packaging User Guide is worth a read. Every page has a “last updated” date displayed, … Read more

No module named pkg_resources

July 2018 Update Most people should now use pip install setuptools (possibly with sudo). Some may need to (re)install the python-setuptools package via their package manager (apt-get install, yum install, etc.). This issue can be highly dependent on your OS and dev environment. See the legacy/other answers below if the above isn’t working for you. … Read more

Why use pip over easy_install?

From Ian Bicking’s own introduction to pip: pip was originally written to improve on easy_install in the following ways All packages are downloaded before installation. Partially-completed installation doesn’t occur as a result. Care is taken to present useful output on the console. The reasons for actions are kept track of. For instance, if a package … Read more