Jump to content
2 minutes ago, Wictorian said:

Whenever I watch coding tutorials they create virtual environments most of the time. Do I really need this and does it actually have a functionality?

 

What kind of coding tutorials? If you're referring to web programming, using a virtual machine for testing is recommended as you often need to configure things on the machine itself - which can mess things up for other projects potentially. Additionally, most people have Windows, but plenty of websites run on Linux using a setup called LAMP (Linux, Apache, MariaDB/MySQL, PHP/Python) - in that case, you actually need virtualization of some form, as you can't set up LAMP on Windows alone. So while it isn't strictly required in all cases, it does serve a purpose for web dev in a lot of cases.

Link to comment
https://linustechtips.com/topic/1442519-virtual-environments/#findComment-15476120
Share on other sites

Link to post
Share on other sites

One good argument i can give you for having virtual envs is versions of packages, you could be using x package  version 2 in a project and need version 3 in another and they both arent compatible so you can 2 instances.

THIS IS MY SIGNATURE

Link to comment
https://linustechtips.com/topic/1442519-virtual-environments/#findComment-15476123
Share on other sites

Link to post
Share on other sites

3 hours ago, Wictorian said:

Whenever I watch coding tutorials they create virtual environments most of the time. Do I really need this and does it actually have a functionality?

 

It mostly depend on the langage you coding in and the kind of project. As an exemple, in python, you can create a virtual env to define the version of python(ex: 2.7.0 or 3.10) your application is supposed to run in. And most of the time we also lock versions of librairies version in a requirements files as it facilitate deployment and ensure your program run in that specific environnement.

you dont need a virtual env in vanilla javascript since it is supposed to run in the web browser. NodeJS is kinda different, you dont need a virtual env, but as good practice we lock the version of librairies in a json file.

 

some librairies tends to change or to remove certain fonctions from a version to another, specifying their version in an virtual env or using a requirements files ensure that our application will run as it is supposed to be and that every developpers who work on that application will have the same condition/environnement.

Link to comment
https://linustechtips.com/topic/1442519-virtual-environments/#findComment-15476335
Share on other sites

Link to post
Share on other sites

On 7/11/2022 at 9:46 PM, YoungBlade said:

What kind of coding tutorials? If you're referring to web programming, using a virtual machine for testing is recommended as you often need to configure things on the machine itself - which can mess things up for other projects potentially. Additionally, most people have Windows, but plenty of websites run on Linux using a setup called LAMP (Linux, Apache, MariaDB/MySQL, PHP/Python) - in that case, you actually need virtualization of some form, as you can't set up LAMP on Windows alone. So while it isn't strictly required in all cases, it does serve a purpose for web dev in a lot of cases.

No they are not about web development

Link to comment
https://linustechtips.com/topic/1442519-virtual-environments/#findComment-15479007
Share on other sites

Link to post
Share on other sites

On 7/11/2022 at 9:49 PM, Srijan Verma said:

One good argument i can give you for having virtual envs is versions of packages, you could be using x package  version 2 in a project and need version 3 in another and they both arent compatible so you can 2 instances.

Ok but how probable is this?

Link to comment
https://linustechtips.com/topic/1442519-virtual-environments/#findComment-15479010
Share on other sites

Link to post
Share on other sites

1 hour ago, Wictorian said:

Ok but how probable is this?

Depends on how many projects you're working on at the same time. Probably less of a concern if you're a hobbyist, but if you're doing this for a living and you need to maintain various (legacy) company apps based on different library versions it can help.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
https://linustechtips.com/topic/1442519-virtual-environments/#findComment-15479140
Share on other sites

Link to post
Share on other sites

23 hours ago, Eigenvektor said:

Depends on how many projects you're working on at the same time. Probably less of a concern if you're a hobbyist, but if you're doing this for a living and you need to maintain various (legacy) company apps based on different library versions it can help.

So my approach will be avoid it as long as I can.

Link to comment
https://linustechtips.com/topic/1442519-virtual-environments/#findComment-15480676
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×