Python 中的隐式模块搜索?

发布于 2024-10-12 21:16:04 字数 10978 浏览 3 评论 0原文

我正在努力更全面地了解 Python 虚拟环境,以解决廉价托管解决方案和开发平台上的可移植性问题,但有些部分我不明白。

我一直在构建虚拟环境,但我没有看到将虚拟环境复制到主机所需的完整隔离,假设主机没有安装 python

问题是我将构建一个平台P 没有与系统完全隔离 P --bin/python2.6 -- lib/python2.6/site-packages

PATH 更改为仅包含 P/bin/

PYTHONPATH 为空

完美运行。但是,它仍然访问系统目录来解决虚拟环境中不存在的问题。为什么??

在这种情况下 P=/tmp/pinax2/ `

<块引用> <块引用>

导入系统

打印系统路径

['','/tmp/pinax2/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg','/tmp/pinax2/lib/python2.6/ site-packages/pip-0.8.1-py2.6.egg', '/home/marc/PythonPersonalWorkspace/mcapps/societysource', '/tmp/pinax2/lib/python2.6', '/tmp/pinax2/lib /python2.6/plat-linux2', '/tmp/pinax2/lib/python2.6/lib-tk', '/tmp/pinax2/lib/python2.6/lib-old', '/tmp/pinax2/ lib/python2.6/lib-dynload', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk ', '/tmp/pinax2/lib/python2.6/site-packages', '/usr/local/lib/python2.6/dist-packages/pydelicious-0.6-py2.6.egg', '/usr/ local/lib/python2.6/dist-packages/feedparser-4.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/nose-0.11.3-py2.6.egg ', '/usr/local/lib/python2.6/dist-packages/decorator-3.2.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/FormEncode-1.2 .2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/PasteScript-1.7.3-py2.6.egg', '/usr/local/lib/python2.6 /dist-packages/PasteDeploy-1.3.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Beaker-1.5.4-py2.6.egg', '/usr /local/lib/python2.6/dist-packages/Routes-1.12.3-py2.6.egg','/usr/local/lib/python2.6/dist-packages/docutils-0.4-py2.6。鸡蛋','/usr/local/lib/python2.6/dist-packages/simplejson-2.0.9-py2.6.egg','/usr/local/lib/python2.6/dist-packages/WebHelpers- 0.6.4-py2.6.egg','/usr/local/lib/python2.6/dist-packages/Mako-0.3.6-py2.6.egg','/usr/local/lib/python2. 6/dist-packages/MarkupSafe-0.11-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Tempita-0.4-py2.6.egg', '/usr/local/ lib/python2.6/dist-packages/WebTest-1.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/WebError-0.10.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Pygments-1.3.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/AuthKit-0.4.5 -py2.6.egg','/usr/local/lib/python2.6/dist-packages/elementtree-1.2.7_20070827_preview-py2.6.egg','/usr/local/lib/python2.6/dist -packages/distribute-0.6.14-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/setuptools-0.6c11-py2.5.egg', '/usr/local/ lib/python2.6/dist-packages/Myghty-1.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/recaptcha_client-1.0.5-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/pyfacebook-1.0a2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/BeautifulSoup-3.2.0- py2.6.egg','/usr/local/lib/python2.6/dist-packages/flup-1.0.3.dev_20100525-py2.6.egg','/usr/local/lib/python2.6/ dist-packages/JCC-1.9-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/mechanize-0.2.4-py2.6.egg', '/ usr/local/lib/python2.6/dist-packages/Pylons-1.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/pyparsing-1.5.5-py2.6 .egg', '/usr/local/lib/python2.6/dist-packages/python_dateutil-1.5-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/z3ext.lucene -1.1.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.catalog-3.8.1-py2.6.egg', '/usr/local /lib/python2.6/dist-packages/zope.app.container-3.9.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.pagetemplate- 3.11.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.appsetup-3.15.0-py2.6.egg', '/usr/local/ lib/python2.6/dist-packages/zope.app.intid-3.7.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.twisted-3.5 .0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.i18nmessageid-3.5.3-py2.6-linux-i686.egg', '/usr/local /lib/python2.6/dist-packages/zope.index-3.6.1-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/zope.proxy- 3.6.1-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/zope.schema-3.7.1-py2.6.egg', '/usr/ local/lib/python2.6/dist-packages/zope.publisher-3.12.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.component-3.10.0 -py2.6.egg','/usr/local/lib/python2.6/dist-packages/zope.catalog-3.8.1-py2.6.egg','/usr/local/lib/python2.6 /dist-packages/zope.app.publisher-3.10.2-py2.6.egg','/usr/local/lib/python2.6/dist-packages/zope.traversing-3.13.1-py2.6。鸡蛋','/usr/local/lib/python2.6/dist-packages/zope.size-3.4.1-py2.6.egg','/usr/local/lib/python2.6/dist-packages/ zope.security-3.8.0-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/zope.location-3.9.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.lifecycleevent-3.6.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.i18n -3.7.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.exceptions-3.6.1-py2.6.egg', '/usr/local/lib /python2.6/dist-packages/zope.event-3.5.0_1-py2.6.egg','/usr/local/lib/python2.6/dist-packages/zope.dublincore-3.8.1-py2。 6.egg','/usr/local/lib/python2.6/dist-packages/zope.copypastemove-3.8.0-py2.6.egg','/usr/local/lib/python2.6/dist-包/zope.container-3.12.0-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/zope.browser-1.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.tales-3.5.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.pagetemplate -3.5.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.configuration-3.7.2-py2.6.egg', '/usr/local/lib /python2.6/dist-packages/zope.browserpage-3.12.2-py2.6.egg','/usr/local/lib/python2.6/dist-packages/zope.site-3.9.2-py2。 6.egg','/usr/local/lib/python2.6/dist-packages/zope.session-3.9.3-py2.6.egg','/usr/local/lib/python2.6/dist-包/zope.processlifetime-1.0-py2.6.egg','/usr/local/lib/python2.6/dist-packages/zope.error-3.7.2-py2.6.egg','/usr/ local/lib/python2.6/dist-packages/zope.app.publication-3.12.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/ZODB3-3.10.1 -py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/zope.intid-3.7.2-py2.6.egg', '/usr/local/lib /python2.6/dist-packages/zope.app.server-3.5.0-py2.6.egg','/usr/local/lib/python2.6/dist-packages/zope.app.wsgi-3.10。 0-py2.6.egg','/usr/local/lib/python2.6/dist-packages/zope.app.applicationcontrol-3.5.9-py2.6.egg','/usr/local/lib/ python2.6/dist-packages/zdaemon-2.0.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/ZConfig-2.8.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.contenttype-3.5.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.annotation -3.5.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.componentvocabulary-1.0.1-py2.6.egg', '/usr/local/lib /python2.6/dist-packages/zope.ptresource-3.9.0-py2.6.egg','/usr/local/lib/python2.6/dist-packages/zope.datetime-3.4.0-py2。 6.egg', '/usr/local/lib/python2.6/dist-packages/zope.browserresource-3.12.0-py2.6.egg', '/usr/local/lib/python2.6/dist-包/zope.browsermenu-3.9.1-py2.6.egg','/usr/local/lib/python2.6/dist-packages/pytz-2010o-py2.6.egg','/usr/local/ lib/python2.6/dist-packages/zope.copy-3.5.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.broken-3.6.0-py2 .6.egg', '/usr/local/lib/python2.6/dist-packages/zope.filerepresentation-3.6.0-py2.6.egg', '/usr/local/lib/python2.6/dist -packages/zope.dottedname-3.4.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.tal-3.5.2-py2.6.egg', ' /usr/local/lib/python2.6/dist-packages/RestrictedPython-3.6.0-py2.6.egg','/usr/local/lib/python2.6/dist-packages/zope.hookable-3.4。 1-py2.6-linux-i686.egg','/usr/local/lib/python2.6/dist-packages/zope.minmax-1.1.2-py2.6.egg','/usr/local/ lib/python2.6/dist-packages/zope.authentication-3.7.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zc.lockfile-1.0.0-py2 .6.egg','/usr/local/lib/python2.6/dist-packages/transaction-1.1.1-py2.6.egg','/usr/local/lib/python2.6/dist-packages /zope.keyreference-3.6.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.password-3.6.1-py2.6.egg', '/usr /local/lib/python2.6/dist-packages/zope.server-3.8.2-py2.6.egg','/usr/local/lib/python2.6/dist-packages/zope.testing-3.10。 2-py2.6.egg','/usr/local/lib/python2.6/dist-packages/zope.testbrowser-3.10.3-py2.6.egg','/usr/local/lib/python2.2-py2.6.egg' 6/dist-packages/wsgi_intercept-0.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.applicationcontrol-3.5.5-py2.6.egg', '/ usr/local/lib/python2.6/dist-packages/Paste-1.7.3.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6.6-py2 .6.egg','/usr/local/lib/python2.6/dist-packages/virtualenv-1.5.1-py2.6.egg','/usr/local/lib/python2.6/dist-packages /Reindent-0.1.1-py2.6.egg','/usr/local/lib/python2.6/dist-packages/roman-1.4.0-py2.6.egg','/usr/local/lib /python2.6/dist-packages/WebOb-1.0.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/weakrefset-1.0.0-py2.6.egg' ,'/usr/local/lib/python2.6/dist-packages/django_openid-0.1.5-py2.6.egg','/usr/lib/pymodules/python2.6','/usr/local/lib /python2.6/dist-packages/django_extensions-0.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_robots-0.8.0-py2.6.egg', ' /usr/local/lib/python2.6/dist-packages/django_friends-0.1.5-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_mailer-0.1.0- py2.6.egg','/usr/local/lib/python2.6/dist-packages/django_messages-0.4.4-py2.6.egg','/usr/local/lib/python2.6/dist-包/django_announcements-0.1.2-py2.6.egg','/usr/local/lib/python2.6/dist-packages/django_oembed-0.1.3-py2.6.egg','/usr/local/ lib/python2.6/dist-packages/django_db_log-2.2.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_pagination-1.0.7-py2.6.egg ', '/usr/local/lib/python2.6/dist-packages/django_threadedcomments-0.5.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_bookmarks-0.1 .0-py2.6.egg','/usr/local/lib/python2.6/dist-packages/django_ajax_validation-0.1.3-py2.6.egg','/usr/local/lib/python2.6 /dist-packages/django_photologue-2.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_avatar-1.0.5-py2.6.egg', '/usr/local /lib/python2.6/dist-packages/django_flag-0.1.1-py2.6.egg','/usr/local/lib/python2.6/dist-packages/django_microblogging-0.1.2-py2.6。鸡蛋','/usr/local/lib/python2.6/dist-packages/django_locations-0.1.1-py2.6.egg','/usr/local/lib/python2.6/dist-packages/django_uni_form- 0.7.0-py2.6.egg','/usr/local/lib/python2.6/dist-packages/django_sorting-0.1-py2.6.egg','/usr/local/lib/python2.6/ dist-packages/django_markup-0.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_staticfiles-0.3.4-py2.6.egg', '/usr/local/ lib/python2.6/dist-packages/django_email_confirmation-0.1.4-py2.6.egg', '/usr/local/lib/python2.6/site-packages', '/usr/local/lib/python2. 6/dist-packages'、'/usr/lib/python2.6/dist-packages'、'/usr/lib/python2.6/dist-packages/PIL'、'/usr/lib/python2.6/dist -packages/gst-0.10', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.6/gtk-2.0']

<块引用> <块引用>

`

I'm working on a more complete understanding of Python Virtual Environment for portablity issues across cheap hosting solutions and development platforms and there are pieces I don't understand.

I've been building virtual environments, but I'm not seeing the COMPLETE ISOLATION I need for copying virtual environments to hosts assuming the hosts don't have python installed

The problem is I'll build a platform P that's not completely isolated from the system
P
-- bin/python2.6
-- lib/python2.6/site-packages

PATH is changed to contain only P/bin/

PYTHONPATH is blank

Works perfect. But, it still visits system directories to resolve what's not in the virtual environment. WHY??

in this case P=/tmp/pinax2/
`

import sys

print sys.path

['', '/tmp/pinax2/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg', '/tmp/pinax2/lib/python2.6/site-packages/pip-0.8.1-py2.6.egg', '/home/marc/PythonPersonalWorkspace/mcapps/societysource', '/tmp/pinax2/lib/python2.6', '/tmp/pinax2/lib/python2.6/plat-linux2', '/tmp/pinax2/lib/python2.6/lib-tk', '/tmp/pinax2/lib/python2.6/lib-old', '/tmp/pinax2/lib/python2.6/lib-dynload', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/tmp/pinax2/lib/python2.6/site-packages', '/usr/local/lib/python2.6/dist-packages/pydelicious-0.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/feedparser-4.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/nose-0.11.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/decorator-3.2.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/FormEncode-1.2.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/PasteScript-1.7.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/PasteDeploy-1.3.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Beaker-1.5.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Routes-1.12.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/docutils-0.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/simplejson-2.0.9-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/WebHelpers-0.6.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Mako-0.3.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/MarkupSafe-0.11-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Tempita-0.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/WebTest-1.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/WebError-0.10.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Pygments-1.3.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/AuthKit-0.4.5-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/elementtree-1.2.7_20070827_preview-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/distribute-0.6.14-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/setuptools-0.6c11-py2.5.egg', '/usr/local/lib/python2.6/dist-packages/Myghty-1.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/recaptcha_client-1.0.5-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/pyfacebook-1.0a2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/BeautifulSoup-3.2.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/flup-1.0.3.dev_20100525-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/JCC-1.9-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/mechanize-0.2.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Pylons-1.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/pyparsing-1.5.5-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/python_dateutil-1.5-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/z3ext.lucene-1.1.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.catalog-3.8.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.container-3.9.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.pagetemplate-3.11.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.appsetup-3.15.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.intid-3.7.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.twisted-3.5.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.i18nmessageid-3.5.3-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/zope.index-3.6.1-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/zope.proxy-3.6.1-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/zope.schema-3.7.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.publisher-3.12.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.component-3.10.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.catalog-3.8.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.publisher-3.10.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.traversing-3.13.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.size-3.4.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.security-3.8.0-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/zope.location-3.9.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.lifecycleevent-3.6.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.i18n-3.7.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.exceptions-3.6.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.event-3.5.0_1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.dublincore-3.8.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.copypastemove-3.8.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.container-3.12.0-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/zope.browser-1.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.tales-3.5.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.pagetemplate-3.5.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.configuration-3.7.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.browserpage-3.12.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.site-3.9.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.session-3.9.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.processlifetime-1.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.error-3.7.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.publication-3.12.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/ZODB3-3.10.1-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/zope.intid-3.7.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.server-3.5.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.wsgi-3.10.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.app.applicationcontrol-3.5.9-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zdaemon-2.0.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/ZConfig-2.8.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.contenttype-3.5.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.annotation-3.5.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.componentvocabulary-1.0.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.ptresource-3.9.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.datetime-3.4.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.browserresource-3.12.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.browsermenu-3.9.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/pytz-2010o-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.copy-3.5.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.broken-3.6.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.filerepresentation-3.6.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.dottedname-3.4.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.tal-3.5.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/RestrictedPython-3.6.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.hookable-3.4.1-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/zope.minmax-1.1.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.authentication-3.7.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zc.lockfile-1.0.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/transaction-1.1.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.keyreference-3.6.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.password-3.6.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.server-3.8.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.testing-3.10.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.testbrowser-3.10.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/wsgi_intercept-0.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zope.applicationcontrol-3.5.5-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Paste-1.7.3.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/virtualenv-1.5.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Reindent-0.1.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/roman-1.4.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/WebOb-1.0.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/weakrefset-1.0.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_openid-0.1.5-py2.6.egg', '/usr/lib/pymodules/python2.6', '/usr/local/lib/python2.6/dist-packages/django_extensions-0.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_robots-0.8.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_friends-0.1.5-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_mailer-0.1.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_messages-0.4.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_announcements-0.1.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_oembed-0.1.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_db_log-2.2.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_pagination-1.0.7-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_threadedcomments-0.5.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_bookmarks-0.1.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_ajax_validation-0.1.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_photologue-2.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_avatar-1.0.5-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_flag-0.1.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_microblogging-0.1.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_locations-0.1.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_uni_form-0.7.0-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_sorting-0.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_markup-0.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_staticfiles-0.3.4-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_email_confirmation-0.1.4-py2.6.egg', '/usr/local/lib/python2.6/site-packages', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.6/gtk-2.0']

`

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

許願樹丅啲祈禱 2024-10-19 21:16:04

你在谈论虚拟环境吗?创建排除所有现有站点包的虚拟环境时,有一个选项。我想这就是你想要的。

virtualenv --no-site-packages env

Are you talking about virtualenv? There's an option when you create the virtual environment that excludes all existing site packages. I think that's what you want.

virtualenv --no-site-packages env
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文