0

How do I install packages such as python3, and use them under a different name like python?

mxdsp
  • 3,988
Jordan Baron
  • 131
  • 3

2 Answers2

1

As explained by Zanna in comments, this is a workaround, but you might want to set an alias in your .bashrc file.

Open file :

gedit ~/.bashrc

Add this at the end :

alias python="python3"
alias pip="pip3"

Save and exit, then :

source .bashrc

Then you can use the new aliases inside terminal instead of actual command:

python -V
>>> Python 3.6.0
mxdsp
  • 3,988
0

You can't actually do that. When you install it, it'll go where it belongs.

@Zanna points to a similar question about changing symlinks but then it goes on to explain how that will have ripple effects across the system where it is assumed those symlinks point to Python 2.

This is a slightly interesting question, but I have searched and cannot find a business case for doing this, and have found many reasons why it probably would break your system if you succeeded. Time spent for a negative result is not good business.

If you want to try working on this I suggest you do it in a VM instead of on a live, functioning system.

SDsolar
  • 3,219