问题描述
我在两台服务器上工作,在一台服务器上.pydistutils.cfg看起来像:
I work on two servers, and on one server .pydistutils.cfg looks like:
install_scripts=~/opt_old/bin
install_data=~/opt_old/share
install_lib=~/usr/lib/python2.6/site-packages
我认为,这会在使用pip并在本地版本的python上链接库时造成问题.
I think, this creates problems with using pip and linking libraries on local versions of python.
在第二台服务器上,该文件不存在,并且我没有任何问题.
On the second server, the file is non existent, and I don't have any issues.
为什么我们需要这个文件,为什么PYTHONPATH不够用?
Why do we need this file and why is PYTHONPATH not sufficient?
我安装了Python的本地版本,并将文件重命名为.pydistutils.cfg.因此,该文件似乎并不那么重要.
I installed a local version of Python and renamed the file .pydistutils.cfg. Hence, it seems that the file is not that important.
推荐答案
一个不错的文章在这里:
A pretty good write-up is here:
http://bouktin.blogspot.com/2012/04/configure-pydistutilscfg-python .html
我没有立即看到普通开发人员应该使用它的原因,对我来说似乎有点笨拙,如果您制作自己的发行版,目标docker或类似的分发系统或目标嵌入式系统,这也许很有意义?
I don't immediately see a reason why an average developer should use it, it seems a bit kludgy to me, perhaps it makes sense if you make your own distro, target docker or similar distribution system or target an embedded system?
这是一个超简单的用法示例:
Here's a super-simple usage example:
https://github.com/amolenaar/gaphor/wiki/Custom-Python-Installation -位置
这篇关于.pydistutils.cfg有什么用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!