how do virtualenvs actually work (advanced) anthony explains #522

preview_player
Показать описание
today I go over the technical details of how virtualenvs actually function, including the absurdity of needing to start 3 processes for every executable on windows

==========

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!
Рекомендации по теме
Комментарии
Автор

This video should've been titled: Shimlinks and shebangs

mrswats
Автор

Most of the first differences you mentioned between POSIX and Windows venvs make sense. The capital Lib directory without the python3.10 subdirectory and Scripts instead of bin are how the equivalent directories are at the system level (C:\Python310) too (no need for python3.10 directory inside Lib when it is already inside a Python310 directory, unlike POSIX). The only thing about this that really annoys me is that they do include an activate bash script on Windows (in addition to activate.bat) in case you're using bash on Windows (like Git bash), but it is source venv/Scripts/activate instead of source venv/bin/activate. I'm so close to getting the POSIX-like workflow I like on Windows (natively, without WSL or Cygwin nonsense), but they couldn't just give me another copy of activate in a bin directory?

sparkyb
Автор

Great video!
About symlinks, windows supports them, as well as longer paths, but this needs to be fixed using registry ;)

dstinYwOw
Автор

Thanks for this!
Does WSL work as other POSIX venvs?

OrCarmi
Автор

maybe a difficult one to demonstrate, but can you make a tutorial about when given a huge project, pytest for instance, how do we start from ?

Cookie-mvhg
Автор

would have been interesting to have also dived into the activate script(s) but I guess it's just for modifying the path to use the specific executables?

levblit
Автор

How do you autocomplete in Windows CMD? Do you use Ctrl+D Ctrl+F (cmd /f), or is there another method?

MogensHertz
Автор

do you know if there's a pep that defines the sys.base_prefix behaviour that you mentioned at the start?

sadhlife
Автор

Sometimes we need access to `python3-config`. Using virtual environments on Linux, how i get the symlink to `python-config` ?

oleksisfraga
Автор

Can you also do a deep dive into pyenv.

wryltxw
Автор

Something that bothers me in python is dependency management.
Why can't we have 2 versions of numpy in one venv.

For example let's say numba needs numpy 1.22 and pandas needs 1.21
What would python need to do to support that?

JohnZakaria