Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's .pydistutils.cfg for?

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

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.

Why do we need this file and why is PYTHONPATH not sufficient?

I installed a local version of Python and renamed the file .pydistutils.cfg. Hence, it seems that the file is not that important.

like image 817
ilciavo Avatar asked Sep 18 '14 13:09

ilciavo


1 Answers

A pretty good write-up is here:

http://bouktin.blogspot.com/2012/04/configure-pydistutilscfg-python.html

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-Location

like image 143
Dima Tisnek Avatar answered Sep 25 '22 06:09

Dima Tisnek