If we want to install
pandas we can run;
python -m pip install fastapi pandas
To install a specific version we could run;
python -m pip install fastapi==0.50.0
But we can also put our requirements in a file, like so:
pip will install the most recent version of a package
unless we tell it not to. In this example we're saying that
needs to be set exactly while numpy needs to be at least version 1.17.
Given such a file, say
requirements.txt, then we can also install
everything by running;
python -m pip install -r requirements.txt
If you wanted to check which python packages are installed you could run
python -m pip freeze
And if you want to narrow it down you can pipe the output of this command
grep to narrow it down.
python -m pip freeze | grep fastapi
Feedback? See an issue? Something unclear? Feel free to mention it here.
If you want to be kept up to date, consider signing up for the newsletter.