0

I have followed this tutorial on Youtube.

First, I think everything was fine etc. but when I want so run the Server with: python manage.py runserver it doesn't work. I got the following error:

bash: /Applications/MAMP/Library/bin/python: No such file or directory

The manage.py file is there and I have tried it several times. I don't know what the problem can be. I have reinstalled python, home-brew, pip and virtualenv

Glazbee
  • 640
  • 5
  • 22

1 Answers1

0

It sounds like you don't have Python installed, or it isn't present in your PATH variables.

In command line try the following

python --version

You should expect to see

python x.x.x

If it isn't included in your PATH variables, you will receive

'python' is not recognized as an internal or external command,
operable program or batch file.

This can be fixed by going to the following

  1. Right click This PC and select Advanced Properties
  2. Click Environment Variables and select Path from the System variables
  3. Click Edit and add Python. It should be at C:\PythonXX, though it would depend on your install directory

And adding Python


If Python is already installed

If Python is already installed, you aren't in the correct working directory. Could you please share your directory tree, including where manage.py is located.

Glazbee
  • 640
  • 5
  • 22
  • First, thank you. When I type python --version it although says the same thing: -bash: /Applications/MAMP/Library/bin/python: No such file or directory. But I installed python with home-brew. How to install correctly? my working directory is the same as in the youtube video. – Maximilian Scheffel Nov 05 '18 at 05:20
  • It sounds like it's not added in your PATH then. If you were to open Python.exe an try `python --version` it will work. I've edited the first portion of my answer to explain this better for you. – Glazbee Nov 05 '18 at 08:55
  • OK thank you. I work on Mac, so do you maybe although have a explanation for my os? I am desperate :( – Maximilian Scheffel Nov 05 '18 at 09:45
  • Unfortunately not, sorry. – Glazbee Nov 05 '18 at 10:24