The best way to install Python through Windows Command Prompt will be through Chocolatey (Windows Package Manageer).
Steps to install python 3 will be as follows :-
Open CMD using 'Run as Administrator'.
Download and Install Chocolatey using the following command.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
- Download and install python using the following command.
choco install -y python3
- You can check the version to verify if Python was successfully installed as follows.
python --version
Answer from Cyborg on Stack OverflowThe best way to install Python through Windows Command Prompt will be through Chocolatey (Windows Package Manageer).
Steps to install python 3 will be as follows :-
Open CMD using 'Run as Administrator'.
Download and Install Chocolatey using the following command.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
- Download and install python using the following command.
choco install -y python3
- You can check the version to verify if Python was successfully installed as follows.
python --version
You could download the setup you want to install and then install it automatically without using the setup's UI:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri "https://www.python.org/ftp/python/3.7.0/python-3.7.0.exe" -OutFile "c:/temp/python-3.7.0.exe"
c:/temp/python-3.7.0.exe /quiet InstallAllUsers=0 InstallLauncherAllUsers=0 PrependPath=1 Include_test=0
I don't think it will work without admin privileges though, I tried using InstallAllUsers=0 to install it only for the current user but it is still asking for elevation.
There are some options you can use when installing it this way, here is the doc: https://docs.python.org/3.6/using/windows.html#installing-without-ui
I'm trying to use Python in PowerShell - Stack Overflow
Windows powershell starts old python
Why doesn't python 3.10.0 show up on PowerShell?
How to add python to path and how to use it in commandline/powershell?
I have read through some previous posts with the same issue but the solutions are not working for me. Hoping someone can point to my error.
-
Trying to delete Python reference in Windowsapps directory using windows explorer. I get an error message that does not let me delete them.
-
In environmental variables I moved windows apps down below the python line. I still get an error message in Powershell that Python not found.
Try setting the path this way:
$env:path="$env:Path;C:\Python27"
For what's worth, this command did it for me (Python 3.3):
[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";C:\Python33", "Machine")
I just had to restart the PowerShell window after that.
It is usually inside the site-packages folder.
This is my output:
PS C:\Users\NFR> pip --version
pip 19.0.3 from c:\python37\lib\site-packages\pip (python 3.7)
So, in your case, it should be inside ..\Anaconda3\python\lib\site-packages
You have to tick the box: "Add Python 3.9 to PATH" when installing python.
Screenshot
Possibly because after python 3.3 intended command is not python, but simply py
Detailed explanation here
And short answer to your question:
check if powershell command py -0p --list-paths finds any versions.
I am using Windows 11, Python3.10 and Laptop, and Windows Powershell cannot show Python version (command: python --version).
Solution: type Python inside Windows Powershell, it will prompt out Microsoft Store, just click "get", wait to finish the process, then go to Windows Powershell, type "python --version", it can show the Python version.
So the answer I've been getting is add python to environment variables which I have done
But I still get the error when running from user/downloads
python -c "from pdf2docx import Converter"
The system cannot execute the specified program.
p.s why are we banning images makes things so much more complicated?