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.
Related
(Windows 10, python 3.9.13, in command prompt as administrator) I was beginning to learn tensorflow, and followed the steps on their website. When I tried to use the command "pip install --upgrade pip" in virtual environment, it shows me the following message:
Requirement already satisfied: pip in c:\windows\system32\venv\lib\site-packages (22.0.4)
Collecting pip
Using cached pip-22.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 22.0.4
Uninstalling pip-22.0.4:
Successfully uninstalled pip-22.0.4
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\Users\Charles\AppData\Local\Temp\pip-uninstall-r4o_l0mr\pip.exe'
Check the permissions.
Try:
python -m pip install --upgrade pip
I was tired of seeing the warning so figured I'd update pip from 21.0.1 to 21.1.2, however, when using the command D:\Python38\python.exe -m pip install --upgrade pip, or python -m pip install --upgrade pip, the version never changes to 21.1.2. I have restarted my terminal, I have checked my path, the only thing I can think is that I changed the global.cache dir to my D: drive to conserve space on my windows hog of a machine. Here is a snippet from my terminal of what I have going on.
D:\>python -V
Python 3.8.8
D:\>pip -V
pip 21.0.1 from d:\python38\lib\site-packages\pip (python 3.8)
D:\>python -m pip install --upgrade pip
Collecting pip
Using cached pip-21.1.2-py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Successfully installed pip-21.1.2
WARNING: You are using pip version 21.0.1; however, version 21.1.2 is available.
You should consider upgrading via the 'D:\Python38\python.exe -m pip install --upgrade pip' command.
D:\>pip -V
pip 21.0.1 from d:\python38\lib\site-packages\pip (python 3.8)
D:\>python -m pip install --upgrade --no-cache pip
Collecting pip
Downloading pip-21.1.2-py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 939 kB/s
Installing collected packages: pip
Successfully installed pip-21.1.2
WARNING: You are using pip version 21.0.1; however, version 21.1.2 is available.
You should consider upgrading via the 'D:\Python38\python.exe -m pip install --upgrade pip' command.
D:\>pip -V
pip 21.0.1 from d:\python38\lib\site-packages\pip (python 3.8)
my pip config debug info:
D:\>pip config debug
env_var:
env:
global:
C:\ProgramData\pip\pip.ini, exists: False
site:
d:\python38\pip.ini, exists: False
user:
C:\Users\logan\pip\pip.ini, exists: False
C:\Users\logan\AppData\Roaming\pip\pip.ini, exists: True
global.target: D:\Git\pip\site-packages
global.cache: D:\Git\pip\cache
global.pip-cache-dir: D:\Git\pip\cache
I have scoured the internet for an inkling into why this is happening but I can't seem to find an answer. Thing is, this isn't something that I have to have done, it's just nagging at me that I cant figure it out at this point.
I have read through the pip documentation config file and user guide and of course I have looked for my answer here before asking my question, I hope someone out there can give me some insight and thank you for your time.
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
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
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/