ubuntu 13.04 python2.7 cannot import matplotlib and other module
i have just installed matplotlib to generate some plots. but this module cannot be imported in python interpreter. although it can be imported in ipython, when i use ipython to execute those examples. it didn't show anything...
besides that, i also can't use idle.
my os is ubuntu 13.04 and the default python version is 3.0. But i install python 2.7 manually.
is there anything wrong with my python configuration.
my python path is
['', '/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']
this has bothered me for almost a day, thank you in advance!
i just find that only when i start python in terminal, those module cannot be imported!
the sys.path in ipython is
['',
'/usr/bin',
'/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/pymodules/python2.7',
'/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
'/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol',
'/usr/lib/python2.7/dist-packages/IPython/extensions']
but after i add those path to PYTHONPATH, it still cannot work.
so how can i overwrite the pythonpath??
秘刃十六夜
11 years, 7 months ago