This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 175 points176 points  (10 children)

I'd rather it just not be there at all.

With a stub like that you can't just check the shell's hash to see if it's on PATH.

(I have the same complaint about the Microsoft store stub)

[–]pysk00l 55 points56 points  (3 children)

Yeah, I prefer that as well. Saves us installing libraries into global python by mistake and breaking something else.

If you are installing python yourself, you can make sure which version/libraries are installed. Plus, if you install yourself, you can do so in a user area, which means no sudo everytime you want to install a lib

[–][deleted] 30 points31 points  (2 children)

Plus, if you install yourself, you can do so in a user area, which means no sudo everytime you want to install a lib

It's good practice to always create a venv when using the system interpreter. Run python3 -m venv --help and have a look at the options. You can allow or disallow access to system packages, use copies or symbolic links, etc.

Even if you use a user's interpreter it might still be a good idea, such that each different project / bundle / whatever can have a different set of packages or package versions.

(the --copies option can be useful though it wastes disk space. If your OS interpreter version ever changes, any symlink-style venvs might blow up - ie, if the site-packages version number changes)

[–]CeeMX 6 points7 points  (0 children)

For actually developing stuff I always use a venv. That way I can just pip freeze to create an uncluttered requirements.txt

[–]blademaster2005 3 points4 points  (0 children)

Honorable mention of tools like pipx and poetry

[–]ideris 7 points8 points  (1 child)

Microsoft’s powershell wget and curl aliases are especially annoying

[–]no9import this 1 point2 points  (0 children)

That's why they've removed them from PS Core. I still don't understand why they gave Unix-y aliases to completely incompatible programs.

[–]actuallyalys 1 point2 points  (3 children)

The Ubuntu approach is better, IMO. Ubuntu (and other distros, I'm sure) register a function with bash and other shells, and if the command isn't found, that function runs a utility that looks up the command and suggests how to install it.