PIP – Where in the world are my binaries!?!?

If I run pip as root (and, yeah, I know you shouldn’t do that), I get happy functional binaries in /usr/bin. When I do the right thing, I (of course) cannot write to that bin folder. I cannot find my binaries! Running updatedb and using locate doesn’t help. Still got no files.

I ended up tracing an operation to find these things. They’re in my user home directory? And, of course, the locate command (and its database via updatedb) often excludes user home directories by default due to privacy and security concerns. So it looked like nothing was getting written to disk during the pip install.

Once I found the missing binaries in my ~/.local/bin folder, I was able to find that this is all well documented:

“Currently if user is installing their own tools with installers like (pip), they will be installed inside ~/.local/bin or ~/bin but if the same CLI tools are installed at system level the user would not be able to use his own tools because the system one would be picked instead. This happens because .bashrc file adds user PATH to the end instead of the top of PATH list variable.”

 

Of course, I go through all this research and learning to actually find the binary … only to discover that home assistant literally has something hard coded to require that you use a virtual environment. Not just do a pip install as your application user. I really wish people would explain why in their documentation. https://fedoraproject.org/wiki/Home_Assistant just says to type these commands. Which is nice if you don’t know what you are doing. But explaining why a virtual environment is being used would have saved me a lot of trouble just to bash up against another brick wall. Sigh. On the up side, I learned something new about Linux.

Leave a Reply

Your email address will not be published. Required fields are marked *