

That lets us work on projects that use different Python versions very easily.

Virtual environments exist so that we can separate the dependencies of one project from the dependencies of another project. Therefore, it's possible that when we update a library, our code will no longer work because the way that we should use the library has changed. Months or years down the line, if try to install it again, it may well be a different version with different functionality.

The libraries change over time, as new and better ways to do things are discovered and implemented.Īs such, when we install a library for one of our projects, it will be a specific version. We install and use libraries so that we don't have to re-write all that code written by those people ourselves! There are thousands upon thousands of libraries to do all kinds of things, and there are tens or hundreds of thousands of people working on those libraries. The flask library is used to create web applications. Most Python projects we develop will have dependencies: code written by other people that we install and use, so that we don't have to re-write it ourselves.įor example, the requests library is a popular third-party dependency to make HTTP requests.
