3 ms·
The virtual env thing is extra friction but isn’t terrible: $ python -m venv .venv $ source .venv/bin/activate $ pip install -r requirements.txt Most ID
by goodoldneon 4y ago
The virtual env thing is extra friction but isn’t terrible:
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt
Most IDEs will automatically pick up the .venv folder
- bin_bash 4y agoI don't know what you're talking about—every time I have to do this I have no idea what I'm doing and I'm a senior engineer at FAANG. I admit that I'm not a Python engineer, but I have been in the past—twice!
- _dain_ 4y agoIt's just a little switcheroo so that your shell environmental variables point to a project-local Python install rather than a global one.
- neurostimulant 4y agoVirtualenv used to be a third party package, which was a very high friction because you'll need to install it system-wide first (e.g. from distro's package manager) before you can use it to create virtual environments.
- mmcnl 4y agoNot terrible, but still not as good and easy as npm. For example, you can't make a distinction between runtime and development dependencies, and it doesn't solve circular dependencies. Luckily there is Poetry which exactly does this.