Python’s package management system has two issues:
it doesn’t keep track of version numbers explicitly.
it installs packages globally.
Virtual environments address both these issues, by changing the “global” location to within your project folder (much akin to node_modules in JavaScript’s ecosystem). With this new location, we can use a requirements.txt to keep track of our dependencies and their versions (again, much like package.json in Js) and we won’t have conflicts with other apps.