Bash alias --> Python 2.7 to Python 3.3

0 votes
I want to make Python 3.4.2 the default in Linux. I do not have complete knowledge about this but I have read in several places online that you can simply put an alias in the ~/.bashrc or ~/.bash_aliases file like this:

alias python='python3'
 

I don't have either the ~/.bashrc or ~/.bash_aliases file. I have created that but the alias doesn't seem to be working. Am I missing something? Do you need the shebang at the beginning of the file? Can anyone help me with this?
May 9 in Python by ana1504.k
• 7,470 points
26 views

1 answer to this question.

0 votes
Some linux utilities depend on python2.x currently. It will probably break your system if you make that change since python3.x is not backward compatible with python2.x. Unless you are fully aware of the consequences, I would suggest you to not do it.
answered May 9 by SDeb
• 12,360 points

Related Questions In Python

0 votes
1 answer

How to change python version into 3.7.2 for entire pycharm jetbrains IDE projects?

Navigate to the Project page, select the configured interpreters ...READ MORE

answered Feb 27 in Python by Priyaj
• 56,160 points
45 views
+3 votes
2 answers

how to print array integer without [] bracket in python like result = 1,2,3,4,5

Hey @abhijmr.143, you can print array integers ...READ MORE

answered Aug 4, 2018 in Python by Omkar
• 67,120 points

edited Aug 8, 2018 by Omkar 396 views
0 votes
1 answer

I'm using Python 2.7 to convert an XML response (from a REST call to Atlassian Fisheye) into an HTML table.

You don't have a template matching tabularQueryResult in your ...READ MORE

answered Oct 4, 2018 in Python by Priyaj
• 56,160 points
26 views
0 votes
3 answers
0 votes
1 answer

Section postgresql not found in the database.ini file

Python doesn't know what $FILEDIR is. Try an absolute path ...READ MORE

answered Oct 3, 2018 in Python by Priyaj
• 56,160 points
81 views
0 votes
1 answer

Iterating over dictionaries using 'for' loops

key is just a variable name. for key ...READ MORE

answered Oct 8, 2018 in Python by SDeb
• 12,360 points
37 views
0 votes
1 answer

Conflicting dependencies of pypyodbc and blpapi

I figured out that pypyodbc only works ...READ MORE

answered Oct 9, 2018 in Python by Priyaj
• 56,160 points
66 views
0 votes
1 answer

How is Python 2.7.3 and Python 3.3 different?

raw_input() is not used in Python 3. Use input()  ...READ MORE

answered Sep 12, 2018 in Python by SDeb
• 12,360 points
30 views
0 votes
1 answer

How to install OpenCV for Python 2.7?

The official OpenCV installer does not install ...READ MORE

answered Nov 14, 2018 in Python by SDeb
• 12,360 points
68 views