endgre.blogg.se

Python virtual environment
Python virtual environment




python virtual environment

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

  • A folder of third-party libraries that you've installed.Įvery virtual environment we create can be created with a different Python version.
  • A specific version of Python, for example Python 3.9.
  • There are two key parts to a virtual environment: That often happens when we start projects at different times. That way, they can have different versions of the same library.

    python virtual environment

    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.

    python virtual environment

    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.






    Python virtual environment