[issue44302] compile fail when make install run pip install as sudo

Battant report at bugs.python.org
Thu Jun 3 12:39:15 EDT 2021


New submission from Battant <mparchet at sunrise.ch>:

Hello,
5.4.0-73-generic
Here is my configuration
ubuntu 20.04
linux kernel 5.4.0-73-generic

step to reproduce

clone cpytjpm 3.11 repository

https://github.com/python/cpython

compile with this tcl
./configure -with-tcltk-includes=/usr/include/ --with-tcltk-libs=/usr/local/lib/libtcl.so --enable-optimizations

make
sudo make install

Actual result :

compil fail because pip is run as sudo to install python

rm -f /usr/local/bin/idle3
(cd /usr/local/bin; ln -s idle3.11 idle3)
rm -f /usr/local/bin/pydoc3
(cd /usr/local/bin; ln -s pydoc3.11 pydoc3)
rm -f /usr/local/bin/2to3
(cd /usr/local/bin; ln -s 2to3-3.11 2to3)
if test "x" != "x" ; then \
	rm -f /usr/local/bin/python3-32; \
	(cd /usr/local/bin; ln -s python3.11-32 python3-32) \
fi
if test "x" != "x" ; then \
	rm -f /usr/local/bin/python3-intel64; \
	(cd /usr/local/bin; ln -s python3.11-intel64 python3-intel64) \
fi
rm -f /usr/local/share/man/man1/python3.1
(cd /usr/local/share/man/man1; ln -s python3.11.1 python3.1)
if test "xupgrade" != "xno"  ; then \
	case upgrade in \
		upgrade) ensurepip="--upgrade" ;; \
		install|*) ensurepip="" ;; \
	esac; \
	 ./python -E -m ensurepip \
		$ensurepip --root=/ ; \
fi
Looking in links: /tmp/tmpr3j5u6l0
Requirement already satisfied: setuptools in /usr/local/lib/python3.11/site-packages (56.0.0)
Requirement already satisfied: pip in /usr/local/lib/python3.11/site-packages (21.1.1)
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv

See attachement log detais

Could you help me please to fix this issus

Best regards

Battant

----------
components: Build
files: output.log
messages: 395017
nosy: Battant
priority: normal
severity: normal
status: open
title: compile fail when make install run pip install as sudo
versions: Python 3.11
Added file: https://bugs.python.org/file50087/output.log

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44302>
_______________________________________


More information about the Python-bugs-list mailing list