且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在所需的文件夹中安装python软件包

更新时间:2023-10-03 08:09:58

回答有关导出路径的问题.您是否将$ PYTHONPATH作为$ PATH的一部分?如果没有,则应将其添加到路径.

To answer your question about the export path. Do you have $PYTHONPATH as a part of your $PATH? If not you should add it to path.

我认为处理这种情况的***方法是使用虚拟python环境.有几个可供选择,但我最喜欢virtualenv.采用这种方法的原因是因为您可以在单独的文件夹中管理不同版本的python.并在这些文件夹中安装了单独的软件包.我建议您对其进行研究,因为它是一个非常有用的工具.如果您想了解如何使用它,我可以提供 https://virtualenv.pypa.io /en/stable/

The best way to handle this scenario in my opinion is to use a virtual python environment. There are a couple to choose from, but I like virtualenv the best. The reason to take this approach is because you can manage different versions of python in separate folders. And have separate packages installed in these folders. I recommend looking into it as it is a very useful tool. If you want an examole of how to use it i can provide that https://virtualenv.pypa.io/en/stable/