PYTHONPATH 和 PYTHON_LIBRARY_PATH 是什么?
我已经安装了一个软件包,但无法让它工作。我知道此问题的可能原因之一是某些环境变量的值不正确(或不存在)。特别是,我知道我需要设置 PYTHONPATH
和 PYTHON_LIBRARY_PATH
。要为这些变量设置正确的值,我需要知道它们的含义。
例如,安装包后,我得到一个包含很多*.dll文件的目录。我应该使用此目录的名称作为上述两个环境变量之一的值吗?
我还有另一个目录 (C:\OpenCV2.2\Python2.7\Lib\site-packages
),其中仅包含两个文件: cv.lib
和 CV.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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
PYTHONPATH
已记录PYTHON_LIBRARY_PATH< /code> 是我从未听说过的东西。该变量未在我的环境中设置,并且在整个文档中未提及。我还搜索了整个 python 源代码,那里也没有提到该字符串。您在哪里看到这个变量?也许这是一些特定于供应商的东西?
PYTHONPATH
is documentedPYTHON_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?