Oui, j’ai déjà vu ce post.
L’image de la VM Jeedom Delta (Buster) date du 08/10/2019 et il n’y en a pas eu d’autres.
Pour moi la spécificité ce n’est pas que ce soit de l’arm64 mais que c’est une image incluant une install de jeedom à un instant t, alors que dans tous les autres cas d’usage il s’agit d’une install des différentes dérivées de debian suivi de l’install.sh de jeedom qui a été modifié depuis octobre.
ce serait interessant d’avoir « Version OS » de la page santé de la VM Jeedom Delta
une buster 10.0 a un pip version de 18.1 au départ (les versions de pip, pip2, pip3 sont identiques)
actuellement un
# pip install --upgrade pip
# pip3 install --upgrade pip
les fait passer en 20.0.2 mais les répertoires sur lesquels il pointent ne sont plus les mêmes.
$ su -
# pip --version
pip 18.1 from /usr/lib/python2.7/dist-packages/pip (python 2.7)
# pip3 --version
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)
# pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
100% 1.4MB 194kB/s
Installing collected packages: pip
Found existing installation: pip 18.1
Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr
Can't uninstall 'pip'. No files were found to uninstall.
Successfully installed pip-20.0.2
# pip3 install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 18.1
Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'pip'. No files were found to uninstall.
Successfully installed pip-20.0.2
# pip --version
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
pip 20.0.2 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
# pip3 --version
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
pip 20.0.2 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)
# python -m pip --version
pip 20.0.2 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
# python3 -m pip --version
pip 20.0.2 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)
l’exemple que tu donnes de la VM Jeedom Delta est pip 19.3.1 (pip pointe sur python3)
l’exemple de l’Odroid-C2 de @Kyoshi est pip 20.0.2
D’autre part j’avais compris qu’il était prévu qu’un jour pip ne pointe plus par défaut sur python2 mais python3. Il faut s’attendre à ce que ça arrive un jour.
j’ai pris une autre VM pour faire un autre essai en changeant de méthode : (python -m pip install au lieu de pip install)
$ su -
# python3 -m pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
100% 1.4MB 63kB/s
Installing collected packages: pip
Found existing installation: pip 18.1
Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'pip'. No files were found to uninstall.
Successfully installed pip-20.0.2
# python3 -m pip --version
pip 20.0.2 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)
# pip --version
pip 20.0.2 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)
# python -m pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 18.1
Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr
Can't uninstall 'pip'. No files were found to uninstall.
Successfully installed pip-20.0.2
# pip --version
pip 20.0.2 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
# python -m pip install --upgrade pip
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained.
A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip,
can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages (20.0.2)
Remarques :
- j’ai provoqué pip pointant sur python3 et ensuite rétabli la situation.
- un message dit que python 2.7 est mort depuis le début de l’année.
En résumé, il semble préférable d’utiliser :
$ sudo python -m pip install module
$ sudo python3 -m pip install module
plutôt que :
$ sudo pip install module
$ sudo pip3 install module
ce qui pourrait donner :
if [ $(python -m pip list | grep "future " | wc -l) -eq 0 ]; then
echo "Installation du module future pour python"
sudo python -m pip install future
fi
akenad