Hacker News new | ask | show | jobs
by galleywest200 1214 days ago
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...

2 comments

npm has the same property of keeping the files locally, but without any need to activate/deactivate a venv. It “just works” that way by default if you “npm install”
Once you create a venv, you can just refer to its path. I always disliked the whole activate/deactivate steps.
Agreed, using the paths makes it feel like a conventional toolchain. I haven’t tried this but it sounds like if I execute the python executable in the venv directory I get that shell. Only issue from there is writing executables that invoke the venv path in a deployable way
I'd gladly take $1 worth of storage over venv/pip mess.

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

Go apps are self-contained blobs. You can just... not install it ? `go build` will just leave you with binary blob in root dir you can put whenever.

Building means downloading dependencies means an ever-growing module cache with no ability to prune it.

    rm -rf ~/go
once a year ought to do it
rm -rf ~/go is not recommended.

1. This will blow away any programs in ~/go/bin

2. Nothing in ~/go/pkg/mod has +w, so the rm -rf will not work anyway. Try

  go clean -modcache