Quel est le problème? J'ai essayé " python -m pip install -U pip " et " python -m pip install --upgrade pip " avec la même erreur (et " pip install -U --force- réinstallez pip "). que devrais-je faire?
C:\Users\Peyman\PycharmProjects\untitled3>python -m pip install -U pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 9.0.3
Uninstalling pip-9.0.3:
Successfully uninstalled pip-9.0.3
Rolling back uninstall of pip
Exception:
Traceback (most recent call last):
File "C:\Users\Peyman\AppData\Roaming\Python\Python35\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\Peyman\AppData\Roaming\Python\Python35\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\Users\Peyman\AppData\Roaming\Python\Python35\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "C:\Users\Peyman\AppData\Roaming\Python\Python35\site-packages\pip\req\req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "C:\Users\Peyman\AppData\Roaming\Python\Python35\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "C:\Users\Peyman\AppData\Roaming\Python\Python35\site-packages\pip\wheel.py", line 462, in move_wheel_files
generated.extend(maker.make(spec))
File "C:\Users\Peyman\AppData\Roaming\Python\Python35\site-packages\pip\_vendor\distlib\scripts.py", line 372, in make
self._make_script(entry, filenames, options=options)
File "C:\Users\Peyman\AppData\Roaming\Python\Python35\site-packages\pip\_vendor\distlib\scripts.py", line 276, in _make_script
self._write_script(scriptnames, Shebang, script, filenames, ext)
File "C:\Users\Peyman\AppData\Roaming\Python\Python35\site-packages\pip\_vendor\distlib\scripts.py", line 212, in _write_script
launcher = self._get_launcher('t')
File "C:\Users\Peyman\AppData\Roaming\Python\Python35\site-packages\pip\_vendor\distlib\scripts.py", line 351, in _get_launcher
result = Finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'
You are using pip version 9.0.3, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Essayez d’utiliser easy_install -U pip
, selon ce rapport de bogue .
Édition: OK, allez à " https://pypi.org/simple/pip/ " et téléchargez le dernier fichier .whl (faites défiler vers le bas). Lorsque vous l’avez, ouvrez cmd dans le même dossier (en cliquant sur Fichier -> ouvrir powershell/cmd dans l’explorateur de fichiers), puis tapez
pip install filename
, nom_fichier étant le nom du fichier que vous avez téléchargé (devrait être pip-18.0-py2.py3-none-any.whl
).
Essayez ça et dites-moi si ça marche.
Vous pouvez essayer ce qui suit:
python -m pip install -U --force-reinstall pip