I bought a Lenovo laptop in November last year and it came with Windows 10 pre-installed. But I only began using it regularly 3-4 months back.
I was learning Python and I needed to install Python packages through the command prompt( I never used CMD until I decided to install the packages ). But the command prompt wouldn't recognize the command neither would it recognize the python command. I then tried some other basic commands like ipconfig which the command prompt wouldn't recognize as an external or internal command.
I checked and the command prompt has already has PATH variable set up so I don't know what the problem is. Please help. I cannot stop learning Python.
Response after I typed set command in cmd.
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\LENOVO\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=DESKTOP-NPN80JK
ComSpec=C:\Windows\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
HOMEDRIVE=C:
HOMEPATH=\Users\LENOVO
LOCALAPPDATA=C:\Users\LENOVO\AppData\Local
LOGONSERVER=\\DESKTOP-NPN80JK
NUMBER_OF_PROCESSORS=8
OneDrive=C:\Users\LENOVO\OneDrive
OS=Windows_NT
Path=C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\LENOVO\Desktop;C:\Python\Python37;C:\Python;C:\Users\LENOVO\Python\Python37\Scripts;C:\Users\LENOVO\Python\Python37;C:\Users\LENOVO\Python;C:\Python37\Lib;C:\Python37\DLLs;C:\Python37\Lib\lib-tk;C:\Python37;C:\Python37\Scripts;;C:\\Users\\LENOVO\\python;C:\Windows\SysWow64\;C:\Python37\Lib;C:\Python37\DLLs;C:\Python37\Lib\lib-tk;C:\Python37;C:\Python37\Scripts;;C:\Python37\Lib;C:\Python37\DLLs;C:\Python37\Lib\lib-tk;C:\Python37;C:\Python37\Scripts;\Lib;C:\Python37\Lib;C:\Python37\DLLs;C:\Python37\Lib\lib-tk;C:\Python37;C:\Python37\Scripts;\DLLs;C:\Python37\Lib;C:\Python37\DLLs;C:\Python37\Lib\lib-tk;C:\Python37;C:\Python37\Scripts;\Lib\lib-tk;"C:\Python37\Lib;C:\Python37\DLLs;C:\Python37\Lib\lib-tk;C:\Python37;C:\Python37\Scripts;;C:\Python37\Lib;C:\Python37\DLLs;C:\Python37\Lib\lib-tk;C:\Python37;C:\Python37\Scripts;\Scripts\";C:\Windows\system32;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\LENOVO\Desktop;C:\ProgramData\Oracle\Java\javapath;C:\Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\LENOVO\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.8;C:\Users\LENOVO\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.8;C:\Users\LENOVO\Desktop;C:\Users\LENOVO\Python\Python37\Scripts;C:\Users\LENOVO\Python\Python37;C:\ProgramData\Oracle\Java\javapath;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\LENOVO\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.8;C:\Users\LENOVO\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.8;C:\Users\LENOVO\Desktop;C:\ProgramData\Oracle\Java\javapath;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\ProgramData\Oracle\Java\javapath;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\LENOVO\AppData\Local\Microsoft\WindowsApps;C:\Users\LENOVO\AppData\Local\atom\bin;C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 3.7;C:\Users\LENOVO\Microsoft VS Code\bin;C:\Windows\System32;C:\Windows\SysWow64\;
PATHEXT=C:\Users\LENOVO\AppData\Local\Programs\Python\Python38;C:\Users\LENOVO\MyPythonScripts
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=8e0a
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
PythonPath=C:\Python37\Lib;C:\Python37\DLLs;C:\Python37\Lib\lib-tk;C:\Python37;C:\Python37\Scripts;
PY_HOME=C:\Python37\Lib;C:\Python37\DLLs;C:\Python37\Lib\lib-tk;C:\Python37;C:\Python37\Scripts;;C:\Python37\Lib;C:\Python37\DLLs;C:\Python37\Lib\lib-tk;C:\Python37;C:\Python37\Scripts;\Lib;C:\Python37\Lib;C:\Python37\DLLs;C:\Python37\Lib\lib-tk;C:\Python37;C:\Python37\Scripts;\DLLs;C:\Python37\Lib;C:\Python37\DLLs;C:\Python37\Lib\lib-tk;C:\Python37;C:\Python37\Scripts;\Lib\lib-tk;
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\LENOVO\AppData\Local\Temp
TMP=C:\Users\LENOVO\AppData\Local\Temp
USERDOMAIN=DESKTOP-NPN80JK
USERDOMAIN_ROAMINGPROFILE=DESKTOP-NPN80JK
USERNAME=LENOVO
USERPROFILE=C:\Users\LENOVO
VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
windir=C:\Windows
For the command
For /F Tokens^=2* %G In ('""%__AppDir__%reg.exe" Query "HKCU\Environment" /V Path"') Do @Echo ?%H?
The output is :
?C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\LENOVO\Desktop;C:\ProgramData\Oracle\Java\javapath;C:\Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\LENOVO\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.8;C:\Users\LENOVO\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.8;C:\Users\LENOVO\Desktop;C:\Users\LENOVO\Python\Python37\Scripts;C:\Users\LENOVO\Python\Python37;C:\ProgramData\Oracle\Java\javapath;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\LENOVO\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.8;C:\Users\LENOVO\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.8;C:\Users\LENOVO\Desktop;C:\ProgramData\Oracle\Java\javapath;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\ProgramData\Oracle\Java\javapath;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\LENOVO\AppData\Local\Microsoft\WindowsApps;C:\Users\LENOVO\AppData\Local\atom\bin;C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 3.7;C:\Users\LENOVO\Microsoft VS Code\bin;C:\Windows\System32;C:\Windows\SysWow64\;?
For the command :
For /F Tokens^=2* %G In ('""%__AppDir__%reg.exe" Query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path"') Do @Echo ?%H?
The output I get is :
?C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\LENOVO\Desktop;C:\Python\Python37;C:\Python;C:\Users\LENOVO\Python\Python37\Scripts;C:\Users\LENOVO\Python\Python37;C:\Users\LENOVO\Python;%PYTHONPATH%;C:\\Users\\LENOVO\\python;C:\Windows\SysWow64\;%PythonPath%;%PythonPath%\Lib;%PythonPath%\DLLs;%PythonPath%\Lib\lib-tk;"%PythonPath%;%PythonPath%\Scripts\";%SystemRoot%\system32;?