python / cpython

The Python programming language
https://www.python.org
Other
63.49k stars 30.4k forks source link

compile fail when make install run pip install as sudo #88468

Open f01751ed-9f13-4c59-946f-d83b09276b35 opened 3 years ago

f01751ed-9f13-4c59-946f-d83b09276b35 commented 3 years ago
BPO 44302
Files
  • output.log: install output log
  • 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: ```python assignee = None closed_at = None created_at = labels = ['build', '3.11'] title = 'compile fail when make install run pip install as sudo' updated_at = user = 'https://bugs.python.org/Battant' ``` bugs.python.org fields: ```python activity = actor = 'Battant' assignee = 'none' closed = False closed_date = None closer = None components = ['Build'] creation = creator = 'Battant' dependencies = [] files = ['50087'] hgrepos = [] issue_num = 44302 keywords = [] message_count = 1.0 messages = ['395017'] nosy_count = 1.0 nosy_names = ['Battant'] pr_nums = [] priority = 'normal' resolution = None stage = None status = 'open' superseder = None type = None url = 'https://bugs.python.org/issue44302' versions = ['Python 3.11'] ```

    f01751ed-9f13-4c59-946f-d83b09276b35 commented 3 years ago

    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