代码之家  ›  专栏  ›  技术社区  ›  Gregor Slavec

是否可以在Windows上使用符号链接将模块添加到Python搜索路径(例如site packages dir)?

  •  2
  • Gregor Slavec  · 技术社区  · 14 年前

    mklink /D

    我正在使用Python2.6。

    1 回复  |  直到 13 年前
        1
  •  1
  •   Apreche    14 年前

    我只是在Windows7上用Python2.7做的,而且很管用。以下是我遵循的步骤。

    1. cd到站点包目录

      cd c:\Python27\Lib\site包

    2. 创建链接

      mklink/D modulename c:\path\to\module\real\location\modulename