ImportError:没有名为sysconfig的模块

时间:2015-12-23 13:15:46

标签: python python-2.7

每当我尝试运行python模块时,我都会多次出现此错误..例如,我尝试从spark bin文件夹运行pyspark并得到下面显示的错误..

soundarya@soundarya:~/spark/spark-1.5.1-bin-hadoop2.6/bin$ ./pyspark 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site.py", line 563, in <module>
    main()
  File "/usr/lib/python2.7/site.py", line 545, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python2.7/site.py", line 272, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/lib/python2.7/site.py", line 247, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/lib/python2.7/site.py", line 236, in getuserbase
    from sysconfig import get_config_var
ImportError: No module named sysconfig

soundarya@soundarya:~$ whereis python2.7
python2: /usr/bin/python2.6 /usr/bin/python2.7 /usr/bin/python2.6-config /usr/bin/python2 /usr/bin/python2.7-config /usr/lib/python2.6 /usr/lib/python2.7 /etc/python2.6 /etc/python2.7 /usr/local/lib/python2.6 /usr/local/lib/python2.7 /usr/include/python2.6 /usr/include/python2.7 /opt/splunk.old/bin/python2.7 /opt/splunk.old/bin/python2 /opt/splunk/bin/python2.7 /opt/splunk/bin/python2 /usr/share/man/man1/python2.1.gz

任何人都可以帮忙解决这个问题吗?非常感谢你。

0 个答案:

没有答案