python setup.py build develop vs install

Do not miss this exclusive book on Binary Tree Problems. Get it now for free.

In this article, we have explained the differences between the two core build commands for Python projects. The two commands are "python setup.py build develop" and "python setup.py install".

The commands are:

python setup.py install

and

python setup.py build develop

The table listing the differences between the two commands is as follows:

Pointpython setup.py installpython setup.py build develop
ModeProduction modeDevelopment mode
APIs builtBy default, specific APIs are built. Other APIs may be enabled with an environment variable before the install command.All APIs are built
Code ChangesTo test the code changes, re-install the package.Test the code changes without any re-building.
InstallationThis will install the package.This will not install the package but just create .egg-link in the directory.
site-packagesPackage installed in site-packagesNo files copied to site-packages, symbolic link added from .egg-link
OptionsNo extra optionsOptions like --user, --uninstall
When to use?For production environmentFor testing or development environment; and when production build has API errors
Where to install?System-wide or in virtual environmentOnly in virtual environment

With this article at OpenGenus, you must have the complete idea of the differences between the two commands python setup.py build develop and install.

Sign up for FREE 3 months of Amazon Music. YOU MUST NOT MISS.