PYTHONPATH 和 PYTHON_LIBRARY_PATH 是什么?

发布于 2024-10-18 04:17:38 字数 388 浏览 2 评论 0原文

我已经安装了一个软件包,但无法让它工作。我知道此问题的可能原因之一是某些环境变量的值不正确(或不存在)。特别是,我知道我需要设置 PYTHONPATHPYTHON_LIBRARY_PATH。要为这些变量设置正确的值,我需要知道它们的含义。

例如,安装包后,我得到一个包含很多*.dll文件的目录。我应该使用此目录的名称作为上述两个环境变量之一的值吗?

我还有另一个目录 (C:\OpenCV2.2\Python2.7\Lib\site-packages),其中仅包含两个文件: cv.libCV.pyd。我是否应该使用此目录作为上述环境变量之一的值(人们建议这样做,但我不明白为什么)。

I have installed a package and cannot get it to work. I know that one of the possible reasons of this problem is incorrect (or not existing) values of certain environment variables. In particular, I know that I need to set PYTHONPATH and PYTHON_LIBRARY_PATH. To set the correct values for these variables I need to know their meaning.

For example, after the installation of the package, I got a directory with a lot of *.dll files. Should I use the name of this directory as a value for one of the two above mentioned environment variables?

I also have another directory (C:\OpenCV2.2\Python2.7\Lib\site-packages) that contains just two files: cv.lib and cv.pyd. Should I use this directory as a value for one of the above mentioned environment variables (people recommend that but I do not understand why).

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

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

发布评论

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

评论(1

星星的軌跡 2024-10-25 04:17:39
  • PYTHONPATH 已记录
  • PYTHON_LIBRARY_PATH< /code> 是我从未听说过的东西。该变量未在我的环境中设置,并且在整个文档中未提及。我还搜索了整个 python 源代码,那里也没有提到该字符串。您在哪里看到这个变量?也许这是一些特定于供应商的东西?
  • PYTHONPATH is documented
  • PYTHON_LIBRARY_PATH is something I never heard of. That variable is not set in my environment and is not mentioned in the entire documentation. I also searched the entire python source code and that string is also not mentioned there. Where did you see about this variable? Maybe it is some vendor-specific thing?
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文