You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
during Python installation, setup.py should not use .pydistutils.cfg #48905
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2008-12-14.01:31:04.213>labels= ['type-bug', 'expert-installation', '3.9', '3.10', '3.8', 'build']
title='during Python installation, setup.py should not use .pydistutils.cfg'updated_at=<Date2020-11-10.20:55:09.111>user='https://bugs.python.org/jah'
When installing python 2.6, I used:
./configure --prefix=/home/name/usr
Installation was fine and everything was installed to:
~/usr/lib/python2.6
But the .so files were installed to:
~/usr/lib/python
As ~/usr/lib/python was (no longer) declared in my PYTHONPATH, I ran
into import issues. The problem was due to a forgotten file:
~/.pydistutils.cfg
So this is clearly a user error, but I wonder if it is something which
should be avoided at the setup.py level.
When installing python, the installation locations are derived from the
results of ./configure. When setup.py is eventually called, the
installation locations can change. This seems undesirable. Would it be
better if setup.py instructed distutils to ignore any configuration file
so that the installation directories matched what was used by the rest
of 'make install'?
changed the title [-]setup.py should not use .pydistutils.cfg[/-][+]during Python installation, setup.py should not use .pydistutils.cfg[/+]on Dec 14, 2008
BreamoreBoy commented on Jun 26, 2010
BreamoreBoymannequin
Mannequin
More actions
Could an installation guru please take a look at this?
There is a bug here, of some sort. Either the .pydistutils.cfg file's
install clause should override the default --prefix somehow, or the
error message should indicate where the setting for 'home' and
'--prefix' came from to enable the user to debug the configuration. In
the latter case there would also need to be a way to explicitly tell
either make install or configure to ignore .pydistutils.cfg. In the
former case, an explicit --prefix passed to configure would need to
override .pydistutils.cfg.
Activity
jah commentedon Dec 14, 2008
When installing python 2.6, I used:
./configure --prefix=/home/name/usr
Installation was fine and everything was installed to:
~/usr/lib/python2.6
But the .so files were installed to:
~/usr/lib/python
As ~/usr/lib/python was (no longer) declared in my PYTHONPATH, I ran
into import issues. The problem was due to a forgotten file:
~/.pydistutils.cfg
So this is clearly a user error, but I wonder if it is something which
should be avoided at the setup.py level.
When installing python, the installation locations are derived from the
results of ./configure. When setup.py is eventually called, the
installation locations can change. This seems undesirable. Would it be
better if setup.py instructed distutils to ignore any configuration file
so that the installation directories matched what was used by the rest
of 'make install'?
Related: http://bugs.python.org/issue1180
[-]setup.py should not use .pydistutils.cfg[/-][+]during Python installation, setup.py should not use .pydistutils.cfg[/+]BreamoreBoy commentedon Jun 26, 2010
Could an installation guru please take a look at this?
merwok commentedon Nov 18, 2010
Not reading .pydistutils.cfg during CPython’s build seems a good idea to me. I would like confirming opinions.
ned-deily commentedon Feb 20, 2013
rdm notes in duplicate bpo-6138:
There is a bug here, of some sort. Either the .pydistutils.cfg file's
install clause should override the default --prefix somehow, or the
error message should indicate where the setting for 'home' and
'--prefix' came from to enable the user to debug the configuration. In
the latter case there would also need to be a way to explicitly tell
either make install or configure to ignore .pydistutils.cfg. In the
former case, an explicit --prefix passed to configure would need to
override .pydistutils.cfg.
iritkatriel commentedon Oct 4, 2022
This is no longer relevant for 3.12 and probably not worth working about for older versions after all these years.