When I want to update pip with the command python -m pip install --upgrade pip
aborts and I get the following error:
C:\Users\Cristian>python -m pip install -U pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390
b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-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\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\base
command.py", line 215, in main
status = self.run(options, args)
File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\comm
ands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\req\
req_set.py", line 784, in install
**kwargs
File "C:\Users\Cristian\AppData\Roaming\Python\Python36\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\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\req\
req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\whee
l.py", line 462, in move_wheel_files
generated.extend(maker.make(spec))
File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\_ven
dor\distlib\scripts.py", line 372, in make
self._make_script(entry, filenames, options=options)
File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\_ven
dor\distlib\scripts.py", line 276, in _make_script
self._write_script(scriptnames, shebang, script, filenames, ext)
File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\_ven
dor\distlib\scripts.py", line 212, in _write_script
launcher = self._get_launcher('t')
File "C:\Users\Cristian\AppData\Roaming\Python\Python36\site-packages\pip\_ven
dor\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 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.
i have rather same problem
I used Anaconda Prompt and wrote 'conda update pip' command after cloning it had been solved.
@cjadeveloper I suggest you install it using get-pip.py:
Okay. So there's quite a few people who seem to be facing this issue.
It would be nice if you could provide information about the environment for us to reproduce this and try to fix it.
Just performed "python -m pip uninstall pip" first, then "python -m pip install -U pip"
Requirement already up-to-date: pip in c:userclarkkappdatalocalProgramsPythonPython36libsite-packages (10.0.1)
Just performed "python -m pip uninstall pip" first, then "python -m pip install -U pip"
So I have...
C:\GITHUB\stress_testing\venv\Scripts\python.exe: No module named pip
I followed this link Error while upgrading to pip 7.1.10 on Windows 8.1 (python 2.7)
easy_install -U pip
Solved broken dependencies and it worked for me
I had this issue as well... it seems various combinations of PATH and environment mangling can do this. Strangely I was able to upgrade this way:
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
which upgraded my system pip from 9.x to 10.0.1. i'd love to be able to explain why that worked but ¯_(ツ)_/¯
I also experienced the same issue. The below later worked for me:
(base) C:XXXXXXXX>conda update pip
(base) C:XXXXXXXX>conda update -n base conda
(base) C:XXXXXXXX>conda create -n my_root --clone="C:ProgramDataAnaconda3"
(base) C:XXXXXXXX>conda activate my_root
(my_root) C:XXXXXXXX>
(my_root) C:XXXXXXXX>pip install tensorflow
(my_root) C:XXXXXXXX>python -m pip install --upgrade pip
Try:
right click Anaconda Prompt (Run as Admin)
$ conda update pip
I am also facing problem while upgrading pip. So, I have first uninstalled it using python -m pip uninstall pip
and then reinstalled it using Anaconda prompt by conda install pip
.
Now it works perfectly with the latest pip version being installed.
Any solution that doesn't require sudo?
@sydanny What's sudo got to do with it? This is a Windows issue...
You should consider upgrading via the 'pip install --upgrade pip' command.
Thedirectory '/Users/hkaushal/Library/Caches/pip/http' or its parent directory is not owned by the
currentuser and the cache has been disabled. Please check the permissions and owner of that
directory.` If executing pip with sudo, you may want sudo's -H flag.
Don't really know how to resolve this..? I tried running sudo -H pip install --upgrade pip
*I ended up figuring it out, thanks!
You should consider upgrading via the 'pip install --upgrade pip' command.
Easy solution that worked for me is, open cmd with admin permissions then repeat the upgrade command
Just a short note on this. I get the same error when I try to upgrade pip within my pycharm console. When I do this from an elevated cmd shell in windows (admin rights) the upgrade is successful.
I tried this in a Mac updating from 9.0.3 to 19.0.3 with python 2.7 , and it worked for me. It seems admin user accouts help
sudo python -m pip uninstall pip
sudo easy_install -U pip
Please don't use easy_install
. It's really old, deprecated and does not generate the metadata needed for uninstalling a package.
For anyone facing issues here, can you please follow https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py? Instead of the curl
command, you can also download the linked file locally instead.
Hi everyone. It looks like @cjadeveloper got their pip fixed, so I'll close this. If you are still experiencing problems please create a new issue. Thanks!
Most helpful comment
I followed this link Error while upgrading to pip 7.1.10 on Windows 8.1 (python 2.7)
easy_install -U pip
Solved broken dependencies and it worked for me