0

newbie here. I am using pycharm with python 3.8, for some reason I can't import any module. When I tried to install from the command line, it said: "'pip' is not recognized as an internal or external command, operable program or batch file."

Same result with pip3. Furthermore, when looking in the \Scripts directory I have enter image description here

So it seems pip is there, but is it problem I have multiple?

  • You may not have written the directory to the environment variable. – Mechanic Pig Aug 23 '22 at 13:32
  • If you run `python --version` in the command line, does it work? You probably need to set python as an environment variable. You can add it to *PATH* with the python installer. Here's an [article](https://medium.com/@omoshalewa/why-you-should-add-python-to-path-and-how-58693c17c443) about it. – Jeff Gruenbaum Aug 23 '22 at 13:34
  • Yes, I have tried that as well: it gives 'python' is not recognized as an internal or external command, operable program or batch file. – Elettra Corso Aug 23 '22 at 13:37
  • If you can use `python` command, you should also be able to use `python -m pip install` to install packages. Assuming that python command will run. – paloman Aug 23 '22 at 13:38
  • @paloman for "python -m pip install" it gives "'python' is not recognized as an internal or external command, operable program or batch file." – Elettra Corso Aug 23 '22 at 13:50
  • 1
    @ElettraCorso I would follow this [article](https://medium.com/@omoshalewa/why-you-should-add-python-to-path-and-how-58693c17c443). The problem is that python is not added to *PATH* environment variable. – Jeff Gruenbaum Aug 23 '22 at 13:53
  • @JeffGruenbaum I have also added it to the path, thanks for the suggestion. However it still doesn't recognize python or pip as commands from the command line – Elettra Corso Aug 23 '22 at 13:59
  • @ElettraCorso Make sure you restart your command line or restart pycharm. – Jeff Gruenbaum Aug 23 '22 at 14:00
  • Thank you everyone! I think I needed to add to PATH, as @JeffGruenbaum pointed out!Thanks so much! – Elettra Corso Aug 24 '22 at 09:07

0 Answers0