PYcharm fails to create Django App

Create Django Application Error creating Django application: Error on Python Side. Exit code: 2, err:/usr/local/bin/bash: -c: line 1: unexpected EOF while looking for matching '"/usr/local/bin/bash: c: line 2: syntax error: unexpected end of file out:

I’ve been using pycharm to write python code with no problems. Now I’m transitioning to learning Django.

Initial Step: Create New Project

  • Select Django from the left menu,
  • New environment using: Virtualenv
  • Location: /User/myname/Desktop/Project1
  • Base interpreter: /usr/bin/python3
  • Template languge: Django
  • Template folder: templates
  • Application name: myFirstProject
  • Enable Django admin: Checked

When I hit enter it starts creating Django, then I get the following error message.

Create Django Application Error creating Django application: Error on Python Side. Exit code: 2, err:/usr/local/bin/bash: -c: line 1: unexpected EOF while looking for matching '"/usr/local/bin/bash: c: line 2: syntax error: unexpected end of file out:

Then the okay button is displayed.

I’ve tried deleting and reinstalling python, Django, Pycharm and even the bash app.

None of this seems to have any affect on the result. I’m at my wits end. Any help would be greatly appreciated.

What operating system are you using?

Have you tried creating the app from the command line rather than through PyCharm?

Have you verified that your virtualenv is created correctly and can be activated?

1 Like
  • My OS is macOS Big Sur Version 11.5.1

  • Yes, I am able to create the app using the command line.

  • No, it was my assumption that pycharm would create the virtualenv at the time of creating the app. I will go review how to do that now. Thank you for the insight!

Your last suggestion was correct!!! I just needed to create and activate the virtualenv! Thanks so much for the help, I spent 3 days trying to figure this one out!