Installing packages with the requirements.txt file to work with PostgreSQL
Make sure you quit Django development server. You just need to press Ctrl +C in the Terminal or Command Prompt window in which it is running.
Now we will install an additional package. Make sure you have activated the virtual environment we have created in the previous chapter and we named Django01
. After you activate the virtual environment, it is time to run many commands, which will be the same for either macOS, Linux, or Windows.
Now we will edit the existing requirements.txt
file to specify the additional package that our application requires to be installed on any supported platform. This way, it will be extremely easy to repeat the installation of the specified packages with their versions in any new virtual environment.
Use your favorite editor to edit the existing text file named requirements.txt
within the root folder for the virtual environment. Add the following lines after the last line to declare the additional...