Before we actually get started, it is important to know how to install a package properly. There are at least four different options for installing a package. The first and most obvious is by using the plain pip
command:
pip install package
This can also be achieved by using setup.py
directly:
cd package python setup.py install
This installs the package within your Python environment which would be the likely virtualenv
/venv
if you are using it or the global environment otherwise.
For development however, this is not recommended. To test your code, you would need to either reinstall the package for every test or modify the files within the Python's site-packages
directory, which would mean it would be outside of your revision control system as well. That's where the development installs come in; instead of copying the package files to the Python package directory, they simply install a link within the site-packages
directory to the path where the package is actually located...