![]() ![]() There are multiple ways of creating an environment, including using virtualenv, venv (built in to the Python 3 standard library), and conda, the package manager associated with Anaconda. Additionally, package managers for other languages, like JavaScript’s NPM ( Node Package Manager), take care of most of these details for you, but you’ll have to get your hands dirty in Python and deal with the environments yourself. For those more familiar with programming, virtual environments are analogous to Docker containers. Virtual environments keep these dependencies in separate “sandboxes” so you can switch between both applications easily and get them running. This is where virtual environments become useful. ![]() If I try running both at once on Python 2 or Python 3, one of them may break because some of the code that runs on Python 2 doesn’t run on Python 3 or vice versa. But we may have many projects on our computer, perhaps a Flask app that runs on version 0.11 (the first one you made!) and Python 2.7 and even a more modern Flask app that runs on version 0.12 and Python 3.4. Likewise, we may need to use specific versions of the libraries for similar reasons. And sometimes when we create software, the software needs to run on a specific version of the language because our software expects a certain behavior that is present in older versions but changes in newer versions. ![]() Python, like many other programming languages, has different versions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |