How to update pip to latest version 20.0.2 - python

While using this command
"python -m pip install --upgrade pip"
I get this error message:
"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 19.2.3
Uninstalling pip-19.2.3:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python38-32\\lib\\site-packages\\pip-19.2.3.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command."
What's the solution to this?

I'm not too sure what the error could be, but I suspect the problem is that you are not running your terminal/command prompt as an administrator. So when you are launching your terminal/command prompt just right-click and run as administrator
Or you could try using a different method of updating pip,
pip install --upgrade pip

Can you try with this command instead ? Also if any issue persists try running cmd as Administrator
python -m pip install --user --upgrade pip

Related

Problem downloading (pytube) library in Python

I want to download a library from Python libraries called (pytube)
When I place the download command [pip install git + https: //github.com/pytube/pytube] in the cmd panel, the following output will come out:
Collecting git+https://github.com/pytube/pytube
Cloning https://github.com/pytube/pytube to c:\users\jit\appdata\local\temp\pip-req-build-w3q3fwqn
Requirement already satisfied (use --upgrade to upgrade): pytube==10.6.1 from git+https://github.com/pytube/pytube in c:\users\jit\appdata\local\programs\python\python39\lib\site-packages
Using legacy 'setup.py install' for pytube, since package 'wheel' is not installed.
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the 'c:\users\jit\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
So I write what prompts [pip install --upgrade pip] into the cmd panel, and it gets the following output:
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.2.3
Uninstalling pip-20.2.3:
Successfully uninstalled pip-20.2.3
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\\Users\\jit\\AppData\\Local\\Temp\\pip-uninstall-pnqylmmj\\pip.exe'
Consider using the `--user` option or check the permissions.
Illustrative image :
https://suar.me/ve9J0
And in another attempt to install it, I typed the command in the (Terminal) inside the (PyCharm) program:
Collecting git+https://github.com/pytube/pytube
Cloning https://github.com/pytube/pytube to c:\users\jit\appdata\local\temp\pip-req-build-o5uke_cl
Running command git clone -q https://github.com/pytube/pytube 'C:\Users\jit\AppData\Local\Temp\pip-req-build-o5uke_cl'
Illustrative image :
https://suar.me/OZYPG
And I did not succeed in installing the library! Why is that? How do I get to the solution?
Try installing pytube3. pip install pytube3
for the pip warning it's just a warning because you are not using the latest version , use this command to upgrade it: python -m pip install --upgrade pip
Welcome to Stackoverflow!!!
For pytube as you already installed, try upgrade to latest version pytube-10.6.1:
python -m pip install --upgrade pytube
For pip install --upgrade pip error, this is happening due to insufficient access:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\\Users\\jit\\AppData\\Local\\Temp\\pip-uninstall-pnqylmmj\\pip.exe'
Solution:
Consider using the `--user` option or check the permissions.
Try:
python -m pip install --upgrade pip --user
Or open the command prompt as administrator and execute the same command.

I get the following error while upgrading pip in python

ERROR: Could not install packages due to an EnvironmentError:
[WinError 5] Access is denied:
'c:\python39\lib\site-packages\pip-20.2.3.dist-info\entry_points.txt'
Consider using the --user option or check the permissions.
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is
available. You should consider upgrading via the
'c:\python39\python.exe -m pip install --upgrade pip' command.
A duplicate of this. But here goes:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\python39\lib\site-packages\pip-20.2.3.dist-info\entry_points.txt' Consider using the --user option or check the permissions.
A permission error, you can run your command prompt as an administrator or add the --user flag on your pip command.
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available. You should consider upgrading via the 'c:\python39\python.exe -m pip install --upgrade pip' command.
Just a warning telling you that you have an outdated pip version.

How to upgrade pip?

I want to install tensorflow, but I need to upgrade pip. How to upgrade pip? I tried to upgrade through the command line and this is what I got.
C:\Users\garoo>python -m pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 10.0.1
Uninstalling pip-10.0.1:
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python36-32\\lib\\site-packages\\pip-10.0.1.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.
You are using pip version 10.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\garoo>python -m pip install --upgrade pip
To upgrade pip from the command line:
python -m pip install --upgrade pip
You do not need to upgrade pip to install tensorflow. Although if you still wish to do so you can try this
pip install --user --upgrade pip
Else try running the CMD as Admin
For permission error while installing Python dependencies, you need to run the terminal or command prompt or powershell as administrator
Example below:
How to upgrade pip using command prompt:
Open the command prompt from the Start Menu
Click the lower-left Start button to open the Start Menu
input cmd in the empty box and tap Command Prompt in the results
Use python -m pip install --upgrade pip to uninstall the old pip package and install the current version.
Collecting pip
Downloading pip-22.0.4-py3-none-any.whl (2.1 MB)
---------------------------------------- 2.1/2.1 MB 284.1 kB/s eta 0:00:00
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 22.0.3
Uninstalling pip-22.0.3:
Successfully uninstalled pip-22.0.3
Successfully installed pip-22.0.4
Adding up to #Iain Hunter's answer, if the command prompt provides you with an error:
'python' is not recognized as an internal or external command,
operable program or batch file.
Try changing python -m pip install --upgrade pip to py -m pip install --upgrade pip. If cmd still provides you the error, try downloading Python once again; Maybe you accidentally unchecked the download pip box while downloading Python.
m pip install --upgrade pip
Write this clause on terminal and press Enter
m pip install --upgrade pip

cmd pip displaying errors whenever I try to install pygame

I am on a windows 10 system, and I recently installed the latest version of python python 3.7.0. I enable the PATH and tried to install pygame through CMD.
I first type in pip, that works as normal.
I then try pip install pygame
Now, this is where the problem arises.
CMD comes up with this:
Collecting pygame
Using cached https://files.pythonhosted.org/packages/b0/30/4df62b0eb0f09a8ad1c329ff5479b3b115e8dce25475fd0c2f73cb790aa4/pygame-1.9.4-cp37-cp37m-win32.whl
Installing collected packages: pygame
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python37-32\\Lib\\site-packages\\pygame'
Consider using the `--user` option or check the permissions.
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
So I type in python -m pip install --upgrade and then this happens:
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 10.0.1
Uninstalling pip-10.0.1:
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python37-32\\lib\\site-packages\\pip-10.0.1.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Why is it doing this?
Somebody please help me and thank you in advance.
"Access dienied" means that you don't have enough permissions to change the global setup of your Python installation.
Either open a cmd line with Adminstrator permissions, or better: learn how to use Python virtual environments: https://docs.python-guide.org/dev/virtualenvs/

pip install -U setuptools fail windows 10

I just installed Python3.7 and Pycharm on my Windows 10 PC.
I am running pip version 9.0.2
In Pycharm, it says I have version 28.8.0 of setuptools, when I try to upgrade this in Pycharm, which I believe runs the line
pip install -U setuptools
I get the error:
PermissionError: [WinError 32] The process cannot access the file because it
is being used by another process:
'c:\users\Username\pycharmprojects\untitled1\venv\lib\site-
packages\setuptools-28.8.0-py3.6.egg' ->
'C:\Users\Username\AppData\Local\Temp\pip-i5jxitem-
uninstall\users\Username\pycharmprojects\untitled1\venv\lib\site-
packages\setuptools-28.8.0-py3.6.egg'
I have tried running
pip install --upgrade setuptools
which runs successfully and says I have the latest version.
Does anyone know how I can successfully update setuptools?
The reason I'd like setuptools to be up to date, is so I can then get rid of the egg_info error installing other packages.
I have the same error. Not sure why it happened. But I managed to upgrade by running:
pip install setuptools --upgrade --ignore-installed
You can also try:
easy_install --upgrade setuptools
Even though easy_install's deprecated, there's a good chance it'll still work on Windows.
If you try to use pip to upgrade setuptools:
pip install -U setuptools
it seems to get stuck on an error about 10.0 vs 18.0 "You should consider upgrading via the 'python -m pip install --upgrade pip' command."
The official pip doco(https://pip.pypa.io/en/stable/installing/#upgrading-pip) says on Windows to use this:
python -m pip install --upgrade pip
However, it seemed pip and setuptools had a hiccup with a circular dependency or lock around pip-v9.0 or 10.0 to pip-18.0 and setuptools v28.0 to v39.0 or 40.0 so persevere with this:
python -m pip install --force-reinstall pip
You need setuptools >= 39.0 if you want to install pipenv also.
Try the following command to upgrade the setup tools in windows
pip install -U pip setuptools
or
pip install setuptools --upgrade --ignore-installed
I solved more or less similar problem as follow:
In my PyCharm project terminal tab:
`(venv) PS C:/path/to/project>`
updated pip, setup tools and wheels with command:
py -m pip install --upgrade pip setuptools wheel
(source of recommendation)

Categories

Resources