Live data from Hacker News

One does not simply 'pip install'

ianwootten.co.uk

1–10 of 118 posts

Re: One does not simply 'pip install'

#2
Omg this is so true! I installed a package globally, but then my interpreter was using another version of python, which doesn't have the installed package. It took me an hour to find out about this. What a waste of time.

Re: One does not simply 'pip install'

#5
The article talks about installing Python packages for development, but if you find yourself using `pip` to install Python tools/scripts then you should use `pipx` - it will properly sandbox those tools so they don't break (or be broken by) the system or other Pythons:

https://pypa.github.io/pipx/

Re: One does not simply 'pip install'

#6

While I agree with the author to not do global pip installs for every new project, I also don’t want to see text in every git repo README explaining Python package managers.

The lack of one true package management approach is a failure of the language. OP is advocating for a saner default like npm, instead of the current venv + pip mess.

Re: One does not simply 'pip install'

#7

The article talks about installing Python packages for development, but if you find yourself using `pip` to install Python tools/scripts then you should use `pipx` - it will properly sandbox those tools so they don't break (or be broken by) the system or other Pythons: https://pypa.github.io/pipx/

The problem is that everyone has different problems with python packaging and everyone has different idea what you "should" do.

Re: One does not simply 'pip install'

#9

While I agree with the author to not do global pip installs for every new project, I also don’t want to see text in every git repo README explaining Python package managers.

The lack of one true package management approach is a failure of the language. OP is advocating for a saner default like npm, instead of the current venv + pip mess.

I like venv/pip. I can blow out the directory when I am done with it. I do not need to remember what is installed were.

Compare this to my GOPATH/GOROOT which is insanely full of mods...gigabytes...

Re: One does not simply 'pip install'

#10
poetry breaks once a while for me, so I am not using it these days.

pipenv used to be my first choice but it became inactive, seems it is actively under development again?

a few weeks ago there is a recommendation for PDM but I have not really used it.

For now I am using the pip+venv approach.

By the way, you better do: `python -m pip install` instead of `pip install`, don't remember why anymore but I did read somewhere that explained the difference and I agreed on then to prefer 'python -m pip install'

Post reply on HN