0

I have a problem with installing packages in my pycharm project.

Until today everything worked perfectly, I could install packages and everything worked. I didn't change anything but now everytime I try to install new package I get an error

pycharm message 1

pycharm message 2

But I do have pip installed in python interpreter interpreter packages

I'm trying to understand what is the problem and how to fix it. I'm not sure if this is the problem, but the interpreter is python 3.7 and the weird thing is when I'm checking the version on my cmd it's 3.8.3 but when I checked on Windows's apps it showed python 3.7.3

python version from cmd

Is there a reason it happened just randomly after it worked perfectly in the last couple of weeks I worked on the program?

Maybe it's because i updated the pip?

2 Answers2

0

You can try few things

  1. Running same command in terminal. If it doesn't work then please locate your pip.exe which is generally in the Scripts folder right next to python.exe. Make sure the path/to/folder is in environment variables

  2. Reset project settings. Try deleting .idea directory in your project. This folder is created by pycharm to save settings. Open the project folder again in pycharm and set the interpreter.

Shivang Kakkar
  • 421
  • 3
  • 15
  • I tried it both now. nothing changed.still cant run on terminal... I changed the path again to the path of the venv in the project and I have pip.exe there but nothing changed... – Omer Itach Dec 30 '21 at 14:08
  • that means it's not a pycharm error. if you have `pip.exe` in `Scripts` (not asking about venv) and the path in environment variables then it should work. Did you try inside pycharm in-built terminal? – Shivang Kakkar Dec 30 '21 at 14:14
  • Ok i copied it to the directory right next my project but now i can install only from terminal but not with settings/add/["package"]. Is there an option to solve it in a way I can do this the old way? – Omer Itach Dec 30 '21 at 14:29
  • You don't need to copy right next to your project. That defeats the whole purpose. The only thing you need to concern is about having path/to/directory of `pip.exe` in environment variables and use the related interpreter whose path should also be in environment variables. Select that interpreter in Pycharm n it would work – Shivang Kakkar Dec 31 '21 at 03:43
0

Did you try to install directly with pip in the terminal ? If it doesn't work maybe you should reinstall it

  • yes I tried, pip is couldn't be found. I tried to fix it with addding it to local variables but it didn't work ass well – Omer Itach Dec 30 '21 at 14:11
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 30 '21 at 18:34