<legend id='WCVLc'><style id='WCVLc'><dir id='WCVLc'><q id='WCVLc'></q></dir></style></legend>

    <bdo id='WCVLc'></bdo><ul id='WCVLc'></ul>
    1. <small id='WCVLc'></small><noframes id='WCVLc'>

      <i id='WCVLc'><tr id='WCVLc'><dt id='WCVLc'><q id='WCVLc'><span id='WCVLc'><b id='WCVLc'><form id='WCVLc'><ins id='WCVLc'></ins><ul id='WCVLc'></ul><sub id='WCVLc'></sub></form><legend id='WCVLc'></legend><bdo id='WCVLc'><pre id='WCVLc'><center id='WCVLc'></center></pre></bdo></b><th id='WCVLc'></th></span></q></dt></tr></i><div id='WCVLc'><tfoot id='WCVLc'></tfoot><dl id='WCVLc'><fieldset id='WCVLc'></fieldset></dl></div>
        <tfoot id='WCVLc'></tfoot>

        如何添加到 Windows 中的 PYTHONPATH,以便找到我的模块/包?

        时间:2023-07-06

        1. <i id='EejBe'><tr id='EejBe'><dt id='EejBe'><q id='EejBe'><span id='EejBe'><b id='EejBe'><form id='EejBe'><ins id='EejBe'></ins><ul id='EejBe'></ul><sub id='EejBe'></sub></form><legend id='EejBe'></legend><bdo id='EejBe'><pre id='EejBe'><center id='EejBe'></center></pre></bdo></b><th id='EejBe'></th></span></q></dt></tr></i><div id='EejBe'><tfoot id='EejBe'></tfoot><dl id='EejBe'><fieldset id='EejBe'></fieldset></dl></div>
            <tbody id='EejBe'></tbody>
          • <bdo id='EejBe'></bdo><ul id='EejBe'></ul>

              • <tfoot id='EejBe'></tfoot>
              • <small id='EejBe'></small><noframes id='EejBe'>

                <legend id='EejBe'><style id='EejBe'><dir id='EejBe'><q id='EejBe'></q></dir></style></legend>
                1. 本文介绍了如何添加到 Windows 中的 PYTHONPATH,以便找到我的模块/包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个存放我所有 Django 应用程序的目录 (C:My_Projects).我想将此目录添加到我的 PYTHONPATH 以便我可以直接调用应用程序.

                  I have a directory which hosts all of my Django apps (C:My_Projects). I want to add this directory to my PYTHONPATH so I can call the apps directly.

                  我尝试将 C:My_Projects; 从 Windows GUI 添加到我的 Windows Path 变量(我的电脑 > 属性 > 高级系统设置 >; 环境变量).但它仍然不读取 coltrane 模块并生成此错误:

                  I tried adding C:My_Projects; to my Windows Path variable from the Windows GUI (My Computer > Properties > Advanced System Settings > Environment Variables). But it still doesn't read the coltrane module and generates this error:

                  错误:没有名为 coltrane 的模块

                  Error: No module named coltrane

                  推荐答案

                  你知道什么在 Windows 上非常适合我.

                  You know what has worked for me really well on windows.

                  我的电脑 >属性>高级系统设置 >环境变量>

                  只需将路径添加为 C:Python27(或安装 python 的任何位置)

                  Just add the path as C:Python27 (or wherever you installed python)

                  然后在系统变量下创建一个名为 PythonPath 的新变量.在这个变量中,我有 C:Python27Lib;C:Python27DLLs;C:Python27Liblib-tk;C:other-folders-on-the-path

                  Then under system variables I create a new Variable called PythonPath. In this variable I have C:Python27Lib;C:Python27DLLs;C:Python27Liblib-tk;C:other-folders-on-the-path

                  这是对我最有效的方法,我在提供的任何文档中都没有找到.

                  This is the best way that has worked for me which I hadn't found in any of the docs offered.

                  对于那些无法获得它的人,请添加

                  For those who are not able to get it, Please add

                  C:Python27;

                  C:Python27;

                  随之而来.否则它将永远不会工作.

                  这篇关于如何添加到 Windows 中的 PYTHONPATH,以便找到我的模块/包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:python setuptool 如何为 libxml2-dev 和 libxslt1-dev 添加依赖项? 下一篇:如何访问环境变量值

                  相关文章

                      <i id='WghwC'><tr id='WghwC'><dt id='WghwC'><q id='WghwC'><span id='WghwC'><b id='WghwC'><form id='WghwC'><ins id='WghwC'></ins><ul id='WghwC'></ul><sub id='WghwC'></sub></form><legend id='WghwC'></legend><bdo id='WghwC'><pre id='WghwC'><center id='WghwC'></center></pre></bdo></b><th id='WghwC'></th></span></q></dt></tr></i><div id='WghwC'><tfoot id='WghwC'></tfoot><dl id='WghwC'><fieldset id='WghwC'></fieldset></dl></div>
                    1. <small id='WghwC'></small><noframes id='WghwC'>

                      <tfoot id='WghwC'></tfoot><legend id='WghwC'><style id='WghwC'><dir id='WghwC'><q id='WghwC'></q></dir></style></legend>

                      • <bdo id='WghwC'></bdo><ul id='WghwC'></ul>