0

Trying to run "django r" command from a django shortcuts https://github.com/jgorset/django-shortcuts

Getting the error 'C:\Program' is not recognized as an internal or external command, operable program or batch file

Any ideas how to fix this? Found some questions with the same error 'C:\Program' error. Not sure how it could help in my case. Command Prompt Error 'C:\Program' is not recognized as an internal or external command, operable program or batch file

edvard_munch
  • 266
  • 1
  • 5
  • 17

1 Answers1

0

This answer is based about assumptions but I hope it helps you.

I thinks you have installed Python in a directory like C:\Programs Files on you computer. In django-shortcuts, python is called by using sys.executable directly in command line (here) and Windows call the first part until space as a executable. You have different ways to solve this, including :

  • use '"%s"' % sys.executable
  • change %(python)s to "%(python)s"
  • reinstall Python in another directory without space in path ...
Starfight
  • 176
  • 2
  • 9