i think a lot about how apparently, someone visiting pink floyd's studio in the mid-70s noticed they had several minimoogs set up with gaffer tape all over them, because when they got a sound they liked, they'd put the tape over the knobs so the settings wouldn't get changed, and invoice the record label for another fresh minimoog. i think this is how you're actually supposed to manage python software installations, just buy a new computer every time you finally get the correct packages set up
before i get the replies, yes the gaffer tape was probably for when they took the synths on tour, and yes i know what virtual environments are

@jk

FWIW, I appreciate most Python bashing.

@jk Time to rename venvs to gaffer

@Ronflaix @jk

Okay, gents. Who is forking virtualvenv for us?

#Python

@jk If you make Docker known as Gaffer Tape for Python it will have been worth it.

@jk this is how I feel whenever a another virtual environment appears. Virtualenv? Pipenv? Venv? Condo? Pew?

How many more will exist???

@Denton @jk I just don't understand how Python management is so much more difficult than Perl considering the age of both.

I use the heck out of cpanspec and just plain rpmbuild to make well-formed RPM packages with all the dependencies tracked that we can manage in-house with yum/dnf, but setuptools doesn't do any auto-dep tracking, leading to venv and Java-style bundles or a lot of manual work making custom bdist_rpm command lines.

I don't know why the common case is so difficult

@raven667 @Denton @jk I'd say it's because Perl is much more Unix-focused.

@raven667 @Denton @jk

Every other friday a new shiny awesome python packaging and venv solution gets thunkpieced into existence.

None of them have tried to solve anything though.

@Denton @jk I think it's because Python programmers need pre-made virtual environments just like they need pre-compiled libraries for every functionality because they're not skilled enough to configure stuff themselves. Same reason there are hundreds of front-end libraries for Javascript.

@Phracker2Art I wouldn't say replicable environments is a skill issue necessarily, in a lot of cases they still have to be configured manually.

The variety of methods to do it can be a bit dizzying, but it's better than no replicability which has been a bit of a problem with Python.

@jk see, in my mind venvs are just the python equivalent of a docker container. i.e. it may as well be a whole new computer
@Skirmisher @jk heh this works great until it doesn't.
@jk I've watched a couple documentaries where folks describe bands doing this with guitar pedals. Even going as far as buying up dozens of spare pedals so that the band would be able to tour indefinitely
@xorn @jk A BBC issue UHER 4000 reel to reel tape recorder often had the knob of the speed control selector removed and sometimes the shaft physically shortened, to prevent reporters using tape speeds other than 19 cm/s (7,5 in/s), which would cause confusion at editing and playout...

@vfrmedia @xorn @jk

Feature-swamp. Often an issue with software, IMO: too many options, most of which are not actually used by or useful to most customers.

@SoftwareTheron @xorn @jk to be fair, the UHER 4000 was sold for a variety of use cases including surveillance recordings (which used lower tape speeds) and broadcasters were only a niche market (another solution would be training the reporters to check the tape speed before recording - the difference in reel speed between 9,5 cm/s and 19 cm/s is fairly obvious to anyone who grew up in the analogue days (at least well designed hardware has more physical feedback than software)
@jk requirements.txt is python's venv gaffer tape.
Good luck sorting what you care about and what you don't if you want to install
@jk this explains eurorack
@jk virtual fresh minimoogs!
@IceWolf me in 2004, opening up instances of steinberg model-E until cubase crashes
@jk recording Wish You Were Here in a zero-interest-rate environment
@jk @paris or use virtualenv's? Both could work I guess?
@thisismissem @jk @paris one of the biggest problems with modern Python is that `python` and `pip` even *work* outside of venvs any more. Experts moved on long ago to a system where global package installs are just a mistake, and there's no reason to use them. If you try they ought to emit an error message telling you to create an env first.

@glyph @thisismissem @jk @paris You can! In ~/.pip/pip.conf set:

[global]
require-virtualenv = true

From SO: For Windows users, this configuration file is not created automatically. You will have to manually create it in the global location specified by "pip config -v list". The default path is currently "C:\ProgramData\pip\pip.ini"

https://stackoverflow.com/questions/39648189/disable-global-installs-using-pip-allow-only-virtualenvs

Disable global installs using pip - allow only virtualenvs

Sometimes by mistake I install some packages globally with plain pip install package and contaminate my system instead of creating a proper virtualenv and keeping things tidy. How can I easily dis...

Stack Overflow

@jk

I thought that was common knowledge? 🤔🐍

But today, you do this with virtual machines: which is why I have about 25 VM per project.

@jk @lisamelton I’m putting a roll of duct tape on my desk and I’m going to tape my keyboard down as soon as this shit works.
@jk you can also build an iso image of your system for better reusability!
@jk whenever I have to deal with Python I create a project directory with copies of all the binaries and libraries and a shell script to set up the environment
@jk Also me at day job (use servers to use/build apps) vs IT (use apps as excuse to ditch as many servers as possible for some irritatingly restricted cloud thing)
@jk Docker is gaffer tape. That’s why it’s so popular.

@jk A few months ago I would have agreed but I was introduced to poetry as a dependency /package manager and it's changed my life.

Check it out: https://python-poetry.org/

Poetry - Python dependency management and packaging made easy

Python dependency management and packaging made easy

@jk this is just Docker, isn’t it?
@jk I just realised that I have done exactly this with a computer I use for one specific project
@jk Never knew this about Pink Floyd. Fascinating.
@jk
or "buy" a new virtualenv
@marick
@jk pyenv to manage and switch between multiple python versions. Add the virtualenv plug-in to keep each projects dependencies separate. Combined with a .python-version file , it will automatically activate the virtualenv when you enter the directory in your shell.
@jk I don't know how long they've been doing it, but when you buy hardware like that from Moog, you get a pad of paper overlays to mark up your patch settings so you can re-create it. :-)

@jk Gosh, the reply guys in this thread are a lot. Wow.

Now, I'm more interested in how many Minimoogs Floyd accumulated. Thinking about it, you could get higher patch density with a room full of Behringer Model-Ds, but the _other_ reply guys would have a fit about that suggestion.

@jk @fwaggle Haha, the curse of multiple projects on the same computer. Now imagine running a webserver with virtual hosts with all different versions of PHP and PHP modules required.

On #FreeBSD it got resolved in the early 2000s by using lightweight jails, while #Linux land was going "VMs is the way to go (and then you suddenly had N+1 problems)".

@mavetju @jk @fwaggle Solaris had containers. Very easy to manage.
@mavetju @jk @fwaggle Nah, webservers are easy. Don't fuss around with virtual host or containers. Just fork off new Apache instance at a different port. Configfile is simple, no sudo involved. I don't understand why so many PHP people depend on distribution Apache.
@jk @0xabad1dea this is how docker was invented
@jk you looked at my long list of Jupyter environments, haven't you? 😅
@jk you just made me realise that I'm doing this with with a bunch of different SD card hard disks for a Raspberry Pi because I'm too lazy/incompetent to use venv to properly containerise my various python programs

@HauntedOwlbear @jk

You're on a Good Path, venv and its siblings are the spawn of the devil.

@jk That's probably right, given that my hard drive only has room for one Conda environment
@jk @BenStauch You might laugh, but this is how it’s done in many neuroscience labs. Once we get the stimulus-delivery or response-recording system working the way we want, reliably, it gets un-plugged from the internet and never upgraded again. If we need to upgrade, we install everything from scratch on a new computer. Every decade or so.
@jk "python -m venv" means you don't have to buy a new computer every time 😄

@jk Joseph Porter of the band Blyth Power said that at one early gig that they played, the sound guy set up the mixing board the way he liked it, then put a piece of burlap over it. Someone's dog then curled up on top of the burlap and went to sleep.

Porter said that was the best sound they ever had, because no one messed with the setup during the show.

@jk This is what I tried to do when I was a research lab tech dealing with a huge NMR magnet. We had shim combos for the signal and I got one so good once no-one had ever seen such precise results. Of course someone came along and fucked it up but whatever.
@jk
Lol.
I used to think like that, then I learned how to use VirtualEnvs, and my life was transformed.
@jk @davidgerard
I think that is the whole point of docker...