

Setup.py is the build script for packages built with setuptools. Sample Project is based on the setuptools package: “A setuptools based setup module.” ] The file is annotated with comments for customizing the script, and for the overall package build environment. Sample Project is a template package with a setup.py file for manual installation of a package. Install_requires=, # Optional keywordĬomplete package build requirements for a setup.py based installation are outlined by PyPA (Python Packaging Authority) in ‘Sample Project’. install_requires is a setuptools setup.py keyword used to specify minimum package requirements. Include install_requires keyword arguments in setup.py.Python -m pip install -upgrade setuptools


Packages installed with setup.py have build requirements that developers must adhere to. cd into the root directory where setup.py is located.To install a package that includes a setup.py file, open a command or terminal window and: Otherwise, the most common method for manually installing a package is to implement setup.py. If the package includes its own set of installation instructions, they should be followed.Download the package and extract it into a local directory.Packages That Cannot be Installed with Pip Python Installation Checklistīefore installing any package, you should always ensure that a Python installation containing the necessary files needed for installing packages is in place by following the Installation Requirements. But if you have a package that is not compatible with pip, you’ll need manually install Python packages. Most Python packages are now designed to be compatible with Python’s pip package manager.
