如何在 Linux 中从 PYTHONPATH 中删除目录。我要求永久删除文件夹,不使用 sys.path 删除。这是我的新 PYTHONPATH
['', '/usr/local/lib/python2.7/dist-packages/django_adminplus-0.2.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/python_linkedin-2.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/django_debug_toolbar-0.9.4-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/django_storages-1.1.8-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/django_uuidfield-0.4.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages', '/usr/local/lib/python2.7/dist-packages/boto-2.9.7-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/tweepy-2.1-py2.7.egg', '/', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/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/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7']
这是我的旧 PYTHONPATH
['', '/usr/local/lib/python2.7/dist-packages/django_adminplus-0.2.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/python_linkedin-2.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/django_debug_toolbar-0.9.4-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/django_storages-1.1.8-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/django_uuidfield-0.4.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages', '/usr/local/lib/python2.7/dist-packages/boto-2.9.7-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/tweepy-2.1-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/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/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7']
不同目录是'/'
如何永久删除这个目录的?