Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 11/09/2023, à 18:28

enebre

[Résolu] erreur "externally-managed-environment" avec pip3

Bonjour, longtemps d'absence, cause maladie...

Après la mise à niveau vers 23.04
erreur avec pip3 :

erreur "externally-managed-environment" avec pip3

J'ai alors suivi la solution proposée par "soshy" 
https://forum.ubuntu-fr.org/viewtopic.p … #p22707084 #8
L'installation c'est bien déroulée, mais pour yt-dlp ça ne fonctionne pas, je ne vois pas où j'aurais fait une erreur.

les commandes proposées par sochy :

sudo apt install build-essential libssl-dev libgtk-3-dev 
cd /tmp
wget https://www.python.org/ftp/python/3.8.16/Python-3.8.16.tgz
tar xf Python-3.8.16.tgz 
cd Python-3.8.16/
./configure --prefix=/opt/python/3.8.16/ --enable-optimizations --with-lto --with-computed-gotos --with-system-ffi
make -j "$(nproc)"
sudo make altinstall
mkdir $HOME/mon_venv
cd $HOME/mon_venv
/opt/python/3.8.16/bin/python3.8 -m venv .
source bin/activate
pip install attrdict
pip install esphomeflasher
python -m esphomeflasher

J'ai remplacé  esphomeflasher par yt-dlp,

Mais :

(mon_venv) marc@marc:cd $HOME/mon_venv
marc@marc:~/mon_venv$ /opt/python/3.8.16/bin/python3.8 -m venv
usage: venv [-h] [--system-site-packages] [--symlinks | --copies] [--clear] [--upgrade] [--without-pip] [--prompt PROMPT]
            ENV_DIR [ENV_DIR ...]
venv: error: the following arguments are required: ENV_DIR
marc@marc:~/mon_venv$ /opt/python/3.8.16/bin/python3.8 -m venv .
marc@marc:~/mon_venv$ source bin/activate
(mon_venv) marc@marc:~/mon_venv$ pip install attrdict
Requirement already satisfied: attrdict in ./lib/python3.8/site-packages (2.0.1)
Requirement already satisfied: six in ./lib/python3.8/site-packages (from attrdict) (1.16.0)
WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available.
You should consider upgrading via the '/home/marc/mon_venv/bin/python3.8 -m pip install --upgrade pip' command.
(mon_venv) marc@marc:~/mon_venv$ pip install yt-dl
ERROR: Could not find a version that satisfies the requirement yt-dl (from versions: none)
ERROR: No matching distribution found for yt-dl
WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available.
You should consider upgrading via the '/home/marc/mon_venv/bin/python3.8 -m pip install --upgrade pip' command.
(mon_venv) marc@marc:~/mon_venv$ pip install yt-dlp
Requirement already satisfied: yt-dlp in ./lib/python3.8/site-packages (2023.7.6)
Requirement already satisfied: certifi in ./lib/python3.8/site-packages (from yt-dlp) (2023.7.22)
Requirement already satisfied: pycryptodomex in ./lib/python3.8/site-packages (from yt-dlp) (3.18.0)
Requirement already satisfied: brotli in ./lib/python3.8/site-packages (from yt-dlp) (1.1.0)
Requirement already satisfied: websockets in ./lib/python3.8/site-packages (from yt-dlp) (11.0.3)
Requirement already satisfied: mutagen in ./lib/python3.8/site-packages (from yt-dlp) (1.47.0)
WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available.
You should consider upgrading via the '/home/marc/mon_venv/bin/python3.8 -m pip install --upgrade pip' command.
(mon_venv) marc@marc:~/mon_venv$

j'avoue avoir lancé une commande inconcidérée
Je croyais que le souci venait de Python, et j'ai fait la bourde, avant de trouver la réponse de "soshy" #8 : https://forum.ubuntu-fr.org/viewtopic.p … #p22707084

j'ai fais

apt --purge python suivi de install python

Est-il possible de réparer "le bazar" que j'ai fait ?

Dernière modification par enebre (Le 13/09/2023, à 17:22)

Hors ligne

#2 Le 13/09/2023, à 17:22

enebre

Re : [Résolu] erreur "externally-managed-environment" avec pip3

Bonsoir,
J'ai réinstallé
Résolu

Hors ligne