16 April 2021

Hanging pip install in a WSL terminal for no apparent reason

Just spent an hour trying to figure out why I couldn't install anything via pip in my WSL terminal. First I thought it was a keyring problem that was making it hang on the command line. Couldn't figure out via strace what was going on, only that it was suck at a "read(3,". Increasing verbosity on the command line didn't help at all, still got nothing. I eventually cursed, reinstalled my Ubuntu WSL environment... and got exactly the same problem.

The culprit? My DISPLAY variable, pointing at my local X server (using VcXsrv) - which wasn't running in the background for some reason, it's normally in my startup. Started that, problem disappeared.

Oops. I've seen this before with other command line programs. Bit of an oddity... what threw me is the fact it didn't time out at all.