Answer the question
In order to leave comments, you need to log in
PIP is not updated, PermissionError, who knows how to solve?
I tried to update PIP version 8.1.1 to 20.2.4, an error got out, please help who knows the solutions to this, I already climbed the forums, but it still does not update, thanks in advance
'''
(venv) [email protected]:~/DB_PDD$ python - m pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/cb/28/91f2...
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1 :
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.5/shutil.py", line 538, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/home/kostya/venv/lib/python3.5/site-packages/pip-8.1.1.dist-info/DESCRIPTION.rst' -> '/tmp/pip-59b6n9nv -uninstall/home/kostya/venv/lib/python3.5/site-packages/pip-8.1.1.dist-info/DESCRIPTION.rst'
During handling of the above exception, another exception occurred:
Traceback (most recent call last ):
File "/home/kostya/venv/lib/python3.5/site-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/home/kostya/ venv/lib/python3.5/site-packages/pip/commands/install.py", line 335, in run
prefix=options.prefix_path,
File "/home/kostya/venv/lib/python3.5/site-packages /pip/req/req_set.py", line 726, in install
requirement.uninstall(auto_confirm=True)
File "/home/kostya/venv/lib/python3.5/site-packages/pip/req/req_install.py", line 747, in uninstall
paths_to_remove.remove(auto_confirm)
File "/ home/kostya/venv/lib/python3.5/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/home/kostya/venv/lib/python3.5 /site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib/python3.5/shutil.py", line 553, in move
os. unlink(src)
PermissionError: [Errno 13] Permission denied: '/home/kostya/venv/lib/python3.5/site-packages/pip-8.1.1.dist-info/DESCRIPTION.rst'
You are using pip version 8.1.1, however version 20.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(venv) [email protected]:~/DB_PDD$ sudo python -m pip install --upgrade pip
/usr/bin/python: No module named pip
(venv) [email protected]:~/DB_PDD$ python -m pip install -- upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/cb/28/91f2...
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1:
Exception:
Traceback ( most recent call last):
File "/usr/lib/python3.5/shutil.py", line 538, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/home/kostya/venv/lib/python3.5/site-packages/pip-8.1.1.dist-info/DESCRIPTION.rst' -> '/tmp/pip-z0i63h0t -uninstall/home/kostya/venv/lib/python3.5/site-packages/pip-8.1.1.dist-info/DESCRIPTION.rst'
During handling of the above exception, another exception occurred:
Traceback (most recent call last ):
File "/home/kostya/venv/lib/python3.5/site-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/home/kostya/ venv/lib/python3.5/site-packages/pip/commands/install.py", line 335, in run
prefix=options.prefix_path,
File "/home/kostya/venv/lib/python3.5/site-packages /pip/req/req_set.py", line 726, in install
requirement.uninstall(auto_confirm=True)
File "/home/kostya/venv/lib/python3.5/site-packages/pip/req/req_install.py", line 747, in uninstall
paths_to_remove.remove(auto_confirm)
File "/ home/kostya/venv/lib/python3.5/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/home/kostya/venv/lib/python3.5 /site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib/python3.5/shutil.py", line 553, in move
os. unlink(src)
PermissionError: [Errno 13] Permission denied: '/home/kostya/venv/lib/python3.5/site-packages/pip-8.1.1.dist-info/DESCRIPTION.rst'
'''
Answer the question
In order to leave comments, you need to log in
Execute first sudo chown -R kostya ~kostya/
.
Then pip install --upgrade pip
. Or maybe even instead python -m pip install --upgrade pip
.
Mono from here:
pip 20.2.4 documentation
Installing with get-pip.py
cd /tmp; wget https://bootstrap.pypa.io/get-pip.py; cd
или
cd /tmp; curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py; cd
--no-setuptools
--no-wheel
python get-pip.py --no-setuptools
sudo
$ # Install the latest version of pip
$ curl https://bootstrap.pypa.io/get-pip.py | python
$ # Install the latest version of pip, supported by a legacy Python
$ curl https://bootstrap.pypa.io/3.2/get-pip.py | python3.2
$ # Install a specific version of pip
$ curl https://bootstrap.pypa.io/get-pip.py | python - 'pip==8.0.0'
cd /tmp; wget https://bootstrap.pypa.io/get-pip.py; sudo python get-pip.py; cd
sudo apt install python-pip
pip install -U pip
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question