python 3 system path

Could someone explain to me why despite using IDLE using Python 3.4 when I create a file and save it if I use the code below:

import sys
.
.
.
.
print sys.path 

I get the following:

 ['/home/username/workspace/test', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client']

I mean system.path is a path that only searches for modules? Even if I am using Python 3.4? I have both python 2.7 and 3 installed in my ubuntu. Am I going to have problem in the future?

In the terminal I can use python 3 as my interpreter but I saw the above result and I don’t know what to do. I have found ways to change sys.path so as to include directories that might contain modules but how am I going to change the entire python 2 directory?


Source: linux

Leave a Reply