2

I have installed MySQL through the MySQL installer. but after that, my cmd didn't recognize python, pip, and ipython anymore. whereas I did not change anything, just installed MySQL. before that, everything was working correctly.

I expected to run python like always. but cmd shows me this : 'python' is not recognized as an internal or external command

mahdi zare
  • 21
  • 1
  • 4
    If you navigate to where your python installation is, and open a command prompt window there, can you run python there? If you can, then your PATH environment variable was probably modified. You would have to add your python directory back to your PATH. – Ahndwoo Sep 03 '19 at 18:05

2 Answers2

2

I think you need to add Python to your local variables. It seems MySQL deletes it.

  1. Start the Run box and enter sysdm.cpl

  2. Go to the Advanced tab in System Properties and click the Environment Variables button:

    Enter image description here

  3. In the System variable window, find the Path variable and click Edit:

    Enter image description here

  4. Position your cursor at the end of the Variable value line and add the path to the python.exe file, preceded with the semicolon character (;). In our example, we have added the value ;C:\Python34.

    Enter image description here

You must change the C:\Python34 if you installed Python in another directory

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ahmad
  • 1,618
  • 5
  • 24
  • 46
1

This may happen because your environmental variables are overwritten by some other application/program.

  1. Click on the Start button
  2. Search for "Environmental Variable" and click on first option.
  3. You will a window like this: https://i.stack.imgur.com/xyneH.png
  4. Click on the Environment Variables... button.
  5. Now you will get this window: https://i.stack.imgur.com/W4Mpj.png
  6. In the above window, double click on "path" highlighted at the bottom.
  7. Now you will get this window: https://i.stack.imgur.com/BQOgT.png
  8. Here check either the location of your Python directory is mentioned or not.
  9. If it is not added, then click on the New button and add the path of your directory (path where the .exe file is located)
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Rahul Singh
  • 184
  • 6