root@rebuild:~# python3.4
Python 3.4.0 (default, Nov 27 2014, 13:54:17)
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/root', '/root/Python-3.4.0/Lib/site-packages/}', '/usr/local/python3.4/lib/python34.zip', '/usr/local/python3.4/lib/python3.4', '/usr/local/python3.4/lib/python3.4/plat-linux', '/usr/local/python3.4/lib/python3.4/lib-dynload', '/usr/local/python3.4/lib/python3.4/site-packages']
>>> import os
>>> os.system("ls /root/Python-3.4.0/Lib/site-packages/")
test.py README
0
>>> import test.py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'test'
It is strange that why can't import test module which is in the sys.path "/root/Python-3.4.0/Lib/site-packages/"?