Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
32
rated 0 times [  32] [ 0]  / answers: 1 / hits: 97052  / 3 Years ago, sat, october 30, 2021, 9:35:31

I have python3.2 located in /usr/lib/python3.2. I am not sure if that means it's installed but I assume it is for now.



Some facts about my system:



$ which python
/usr/local/bin/python


When I type python in terminal I get the following



$ python
Python 2.7.2 (default, Dec 19 2011, 11:12:13)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.


Then to find the path I do



>>> sys.info
>>> sys.path
['', '/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/usr/local/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg', '/usr/local/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-x86_64.egg', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages']


So knowing all of this, how do I change my default system python from 2.7.2 to 3.2?


More From » 10.04

 Answers
4

It's not good to change the default python. Many system programs depends on python2 not python3. if you want to use python3, you just type the command python3.


[#40430] Saturday, October 30, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eryeath

Total Points: 122
Total Questions: 121
Total Answers: 112

Location: Saint Helena
Member since Fri, Aug 26, 2022
2 Years ago
;