My pip command doesn’t work. A few months ago, I put down a pycharm and python on the U disk, and I also used the environment on the U disk, but recently the U disk was lost, and the computer can’t use pip any instructions without adding the U disk, list and install can’t work, the following is the cmd error message
Microsoft Windows
C:Users27669>where pipD:downloadpython_interpreter3.12.2Scriptspip.exeD:python_3.10.9Scriptspip.exe
C:Users27669>pip listERROR: Could not locate Python interpreter E:pycharmpyinterpreterpython.exe
C:Users27669>where pythonD:downloadpython_interpreter3.12.2python.exeD:python_3.10.9python.exeC:Users27669AppDataLocalMicrosoftWindowsAppspython .exe
C:Users27669Desktopget-pip(1).pyC:Users27669>D:downloadpython_interpreter3.12.2python.exeD: ldownloadpython_interpreterl3.12.2python.exe: can’t open file ‘c:llUsers![2766911u202ac:Usersl[27669Desktopllget-pip’:[Errno 22]Invalid argument
C:Users27669>D:downloadpython_interpreter3.12.2python.exe “c:Users27669Desktopget-pip (1).pyERROR: Could not locate Python interpreter E:pycharm pyinterpreter python.ex
C:Users27669>python print(“hello world”)python: can’t open file ‘c:Users[27669print(hello world)’: [Errno 2] No such file or directory
C:Users27669>pythonPython 3.12.2 (tags/v3.12.2:6abddd9,Feb 62024,21:26:36)[MSC v.1937 64 bit (AMD64)] on win32Type “help””credits”ulicense”for more information.”copyright”Or>>> print(“hello world”)hello world
I tried removing all environment variables such as PATH that contains the E drive, installed the new python – 3.10.9 and used its pip directives, or ran the pip directives on pycharm, vscode terminals, but all the same error :ERROR: Could not locate Python interpreter E:pycharmpyinterpreter python.exe but python.exe works fine
lisanndesu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.