virtualenv vs. venv (beginner - intermediate) anthony explains #040

preview_player
Показать описание
today I explain the basics of virtualenv / venv and why you should use them! I also compare / contrast venv and why I tend to pick virtualenv

==========

I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!
Рекомендации по теме
Комментарии
Автор

always wondered whats the difference and thank you so much for this video, very informative

bulelanibotman
Автор

Cheers mate! This really helped a lot, didn't know about virtual environments before this week... My Python setups were pretty much configured in all the ways you should NOT set up Python and in hindsight they were really quite hideous hah. With this knowledge things are miles better now, I managed to use the knowledge gained in this video to overcome an issue that has been causing me so much grief for the last 3 days. Really appreciate the help.

jamescowling
Автор

Cheers Anthony for the clarification - virtualenv & venv.

Tech-Dev
Автор

Awesome video ....Thank you very much for posting

brpawankumariyengar
Автор

Cool, for someone relatively new to Python's virtual env, this sort of helped. Good to know that the virtualenv, has some advantages over the newer venv. So, it appears that knowing/using both would be good and not just abandoned virtualenv altogether. I appreciate your taking the time to make these videos and I'm sure you want to do the best with them. So, don't take this the wrong way, but, it would be helpful if you could slow down or meter your speech more. I struggled understanding some of your descriptions. I found CC did too.

bgable
Автор

DUDE!! I WAS SOO CONFUSED BEFORE WATCHING THIS!! THANK YOU MY MAN!! YOU GOT A SUB!

shivanshmishra
Автор

Thanks for this, Anthony... another great video.

jamesmunroe
Автор

Great video, so helpful to just have all of this laid out in a straightforward manner. Also in general recently discovered your channel and twitch, can't tell you how useful it's been!

Two questions I quickly had:
1. Do you have any practices around storing / keeping track of virtual environments?
2. For python versions, does is virtualenv natively ship with all python versions? Or do you need to download each python that you want to create virtual environments with?

kylespanishes
Автор

You have a really nice persona, and thank you for your explanation. I shall look for other explanations from you :)

jackfrankmurphy
Автор

Really clean explanation! Thanks for making the video!

mackhinastation
Автор

How did you set your directory and prompt in two different lines? It's really cool!!!

thomasc
Автор

i`ve been seeing a lot of videos, could you recommend me what should i choose, a ide like jupyter, or a text editor like vscode? im starting to study seriously data science and this is an important step for me haha

diegoalejandrocortessuarez
Автор

By the way, you can also use Poetry to manage your environments. It works great and I think is has a relatively fast dependancy manager.
And if you want you project to becoma a Pip package, Poetry makes that process extremely easy.

JJSogaard
Автор

Excellent! I know it's years later, but this was a very good succinct explanation!
I do have some additional questions.
If I built a Django project using system python packages instead of in a virtual environment, how do I move my Django project into a virtual environment to isolate it? Is it as simple as copying or moving the Django project directory into the same directory that contains the virtual env folder?

programadordelassombras
Автор

@anthonywritescode
9:54 It's actually possible to create virtualenvs in other Python versions using Venv only:

In windows you type in cmd: python -{version you want to create the virtualenv in} -m vevn {name of your virtualenv}

for example you can say: python -3.5 -m -venv
and it'll create a virtualenv in python 3.5 (you have to add python 3.5 pip to Env Variables before)

idk if that works with python 2 also, I don't use it either

danielcorrea
Автор

Can they work in background as a service or a normal application? And probably run using cronjob?

kpsthakur
Автор

You can have several venv activated at the same time on different folders right ?

optimiserlenergie
Автор

Great video! At the end when you created the environment with a particular python version, I am assuming that you had downloaded and installed the particular version first, correct? I.e., virtualenv does not download it and install it when you run the "virtualenv venv39 -p python3.9" command, correct? If so, is there any precautions or steps that I need to take to simply download and install different python versions for future use with virtualenv? If not, I assume that I can simply download and install versions 3.9 and 2.7 with "apt" in my debian bookworm distro, then create their respective environments. But, this sounds too easy, lol, so I feel like my logic is flawed. Any insights are greatly appreciated, thanks Anthony!

santiagoperez
Автор

I'm actually quite confused. Are you to install a virtualenv for every program you write? What do you do if you want your apache server to run the script? It is not going to be using virtualenv. How do you get one program written in one virtualenv to work with another program needing a different virtualenv? How does docker integrate with it all?

CheapHomeTech
Автор

Does it make multiple copies of the packages in the directory? Is there a way to minimize that?

wryltxw