Want more timely Centmin Mod News Updates?
Become a Member

[Solved] When running centmin, I got this: DEPRECATION: Python 2.7

Discussion in 'Bug Reports' started by rdan, Jan 25, 2019.

  1. rdan

    rdan Well-Known Member

    4,605
    1,111
    113
    May 25, 2014
    Ratings:
    +1,632
    Local Time:
    10:16 AM
    Mainline
    10.2
    Please fill in any relevant information that applies to you:
    • CentOS Version:CentOS 7 64bit
    • Centmin Mod Version Installed:123.09beta01
    • Nginx Version Installed: 1.15.3
    • PHP Version Installed: 7.3.1
    • MariaDB MySQL Version Installed: 10.3.12
    • When was last time updated Centmin Mod code base ? : just now
    I got this warning:
    Code:
    DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
    DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
    DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.

     
    • Like Like x 1
  2. wmtech

    wmtech Active Member

    113
    32
    28
    Jul 22, 2017
    Ratings:
    +85
    Local Time:
    4:16 AM
    We all get those warnings ... :)
     
  3. rdan

    rdan Well-Known Member

    4,605
    1,111
    113
    May 25, 2014
    Ratings:
    +1,632
    Local Time:
    10:16 AM
    Mainline
    10.2
    I don't have it on all my other servers except this new server just installed today.
     
  4. eva2000

    eva2000 Administrator Staff Member

    41,346
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    12:16 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  5. eva2000

    eva2000 Administrator Staff Member

    41,346
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    12:16 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    oh i see at centmin.sh run it is most likely related to pip_updates function

    from debug run of centmin.sh
    Code (Text):
    + pip_updates
    + [[ ! -f /usr/bin/python-config ]]
    + [[ 7 -eq 7 ]]
    + [[ ! -f /usr/bin/pip ]]
    + [[ '' -eq 6 ]]
    + [[ '' -eq 6 ]]
    + [[ 7 -eq 7 ]]
    + [[ -f /usr/bin/pip ]]
    ++ pip show pip
    ++ awk '/^Version: / {print $2}'
    ++ sed -e 's|\.||g'
    + CHECK_PIPVER=1901
    + [[ 1901 -lt 901 ]]
    + [[ 7 -eq 7 ]]
    + [[ -f /usr/bin/pip ]]
    + [[ -f /usr/bin/python-config ]]
    ++ pip list -o --format columns
    ++ LC_ALL=C
    ++ grep -o pip
    DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
    + CHECK_PIPUPDATE=
    ++ pip list -o --format columns
    ++ LC_ALL=C
    ++ grep -o psutil
    DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
    + CHECK_PSUTILUPDATE=
    ++ pip list -o --format columns
    ++ LC_ALL=C
    ++ grep -io glances
    DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
    + CHECK_GLANCESUPDATE=
    + [[ '' = \p\i\p ]]
    + [[ '' = \p\s\u\t\i\l ]]
    + [[ '' = \G\l\a\n\c\e\s ]]
    
     
    • Like Like x 1
    • Informative Informative x 1
  6. rdan

    rdan Well-Known Member

    4,605
    1,111
    113
    May 25, 2014
    Ratings:
    +1,632
    Local Time:
    10:16 AM
    Mainline
    10.2
    Yes, what should i do?
     
  7. eva2000

    eva2000 Administrator Staff Member

    41,346
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    12:16 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    • Winner Winner x 1
  8. eva2000

    eva2000 Administrator Staff Member

    41,346
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    12:16 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    FYI, fixed in latest 123.09beta01 update so run updater SSH command = cmupdate
    Code (Text):
    cmupdate
    No local changes to save
    remote: Enumerating objects: 182, done.
    remote: Counting objects: 100% (160/160), done.
    remote: Compressing objects: 100% (1/1), done.
    remote: Total 28 (delta 27), reused 28 (delta 27), pack-reused 0
    Unpacking objects: 100% (28/28), done.
    From https://github.com/centminmod/centminmod
       e300201..cba74b8  123.09beta01 -> origin/123.09beta01
    Updating e300201..cba74b8
    Fast-forward
     centmin.sh                       |    2 +-
     inc/cpcheck.inc                  |   33 ++++++++++++++++-----------------
     inc/python_install.inc           |   16 ++++++++--------
     installer-dnf-gitlab.sh          |    4 ++--
     installer-dnf.sh                 |    4 ++--
     installer-gitlab.sh              |    4 ++--
     installer-latest-gitlab.sh       |    4 ++--
     installer-latest.sh              |    4 ++--
     installer-minimal-gitlab.sh      |    4 ++--
     installer-minimal.sh             |    4 ++--
     installer-ngxpagespeed-gitlab.sh |    4 ++--
     installer-ngxpagespeed.sh        |    4 ++--
     installer.sh                     |    4 ++--
     installer55-gitlab.sh            |    4 ++--
     installer55.sh                   |    4 ++--
     installer56-gitlab.sh            |    4 ++--
     installer56.sh                   |    4 ++--
     installer7-gitlab.sh             |    4 ++--
     installer7.sh                    |    4 ++--
     installer71-gitlab.sh            |    4 ++--
     installer71.sh                   |    4 ++--
     installer72-gitlab.sh            |    4 ++--
     installer72.sh                   |    4 ++--
     installer73-gitlab.sh            |    4 ++--
     installer73.sh                   |    4 ++--
     25 files changed, 69 insertions(+), 70 deletions(-)
    

    Beta Branch - hide pip 19.01 python 2.7 deprecation warning notice in 123.09beta01
     
    • Like Like x 2
    • Informative Informative x 1
  9. pamamolf

    pamamolf Premium Member Premium Member

    3,443
    329
    83
    May 31, 2014
    Ratings:
    +627
    Local Time:
    5:16 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    After running cmupdate and then centmin i got this:

    But after re running centmin all was ok...
     
  10. rdan

    rdan Well-Known Member

    4,605
    1,111
    113
    May 25, 2014
    Ratings:
    +1,632
    Local Time:
    10:16 AM
    Mainline
    10.2
    All fine now for me, thanks!
     
    • Like Like x 1
  11. eva2000

    eva2000 Administrator Staff Member

    41,346
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    12:16 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Glad to hear and thanks for the bug report :)
    yes that is pip_updates function updating your versions of pip, psutils and glances. The way pip updates work is it tries to remove old versions first before installing new versions. Will have to see if i can silence those messages too.

    but those errors might be due to having yum installed version of glances mixed with pip installed version of glances as pip_updates will remove python2-psutil 2.2.1 and update psutil via pip and side effect is removing python2-psutil removes glances yum install too in favour of glances installed via pip

    yum history and info for glances
    Code (Text):
    yum history list glances
    Loaded plugins: fastestmirror, priorities, versionlock
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        37 | -q -y remove python2-psu | 2019-01-20 05:19 | Erase          |    2  
        11 | -y install clang clang-d | 2019-01-18 03:45 | Install        |   38  
    history list
    

    info for yum transaction id = 37
    Code (Text):
    yum history info 37
    Loaded plugins: fastestmirror, priorities, versionlock
    Transaction ID : 37
    Begin time     : Sun Jan 20 05:19:13 2019
    Begin rpmdb    : 761:dccec8f758359cb04bc8181891670db265628fd8
    End time       :                           (0 seconds)
    End rpmdb      : 759:bf6eeeea017bd0ad2bf30141d85813542473e3e2
    User           : root <root>
    Return-Code    : Success
    Command Line   : -q -y remove python2-psutil
    Transaction performed with:
        Installed     rpm-4.11.3-35.el7.x86_64                      @base
        Installed     yum-3.4.3-161.el7.centos.noarch               @base
        Installed     yum-plugin-fastestmirror-1.1.31-50.el7.noarch @base
    Packages Altered:
        Erase glances-2.5.1-1.el7.noarch        @epel
        Erase python2-psutil-2.2.1-4.el7.x86_64 @epel
    history info
    
     
    Last edited: Jan 25, 2019
  12. JJC84

    JJC84 Active Member

    204
    83
    28
    Jan 31, 2018
    Ratings:
    +129
    Local Time:
    9:16 PM
    1.15.x
    10.1.x
    Thank you I was just about to ask about this and then I got a bit busy. Good to know my servers aren't going to blow up.
     
    • Like Like x 1
  13. eva2000

    eva2000 Administrator Staff Member

    41,346
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    12:16 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Yeah I have a few more updates in 123.09beta01 due soon to further deal with pip_updates function to make it better :)
     
    • Like Like x 1
  14. JJC84

    JJC84 Active Member

    204
    83
    28
    Jan 31, 2018
    Ratings:
    +129
    Local Time:
    9:16 PM
    1.15.x
    10.1.x
    Thank you sir. I just ran cmupdate.
     
  15. Jimmy

    Jimmy Well-Known Member

    1,599
    333
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +841
    Local Time:
    10:16 PM
    1.15.x
    MariaDB 10.3.x
    I just got this error randomly today. Warning seems to have gone away the second time I went into the menu.

    I've used this server multiple times since this thread started and never got a warning until today. (I keep my system updated daily).

    Anyway, wanted to let you know.
     
  16. eva2000

    eva2000 Administrator Staff Member

    41,346
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    12:16 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    yes 123.09beta01 was updated to auto fix this on next centmin.sh run on updated version of centmin.sh, hence you second run would of fixed it :)
     
    • Informative Informative x 1