Because Virtual Environments can and will save you headaches. In early 2020, I was working on a school project using Keras/Tensorflow. Everything was working great. Then, I shared my code with my teammate so he could start working on it too. However, for some reason, it was not working for him.
In early 2020, I was working on a school project using Keras/Tensorflow. Everything was working great. Then, I shared my code with my teammate so he could start working on it too. However, for some reason, it was not working for him.
We spent hours trying to figure it out. Eventually, we realized that the problem was caused by the fact we had different packages versions installed. Once we managed to make it all work, I decided to find a way to avoid this problem occuring ever again.
That’s where virtual environments come in.
If you are already familiar with virtual environments, you can skip to section 4 where I will give some advice and tricks to help you improve and customize your use of virtual environments.
As you get better with Python, you will be using more and more packages and it will get more and more difficult to properly deal with dependencies on earlier versions of packages, hence the need for virtual environments.
Think of a virtual environment as a separate folder where you can keep specific versions of packages or even a specific Python version without affecting the rest of your projects.
It’s an easy way to ensure you (and everybody else) can always run your Python scripts with no dependency issues, i.e. always using the correct versions for your packages.
All codes coming up can be executed directly from the Anaconda prompt or the command line.
Learn how to create Virtual Environment using venv and activate using executables. What is a Virtual Environment? Virtual Environments help create, manage and isolate environments for the project, each one using same or different versions of the executables.
In this tutorial, you’re going to learn a variety of Python tricks that you can use to write your Python code in a more readable and efficient way like a pro.
In this video we will learn the basics of virtualenv or venv in Python. We will learn how to install virtualenv, activate virtualenv for different versions o...
A complete step-by-step tutorial from start to finish. A virtual environment allows your projects to operate independently from the main Python environment. It provides an effective way to prevent version conflicts between dependencies of different projects.
I will walk you through everything about Virtual Environment in Python that you should know like from “what is virtual…