0

I can create a project outside of a virtual environment just fine, but when I am using a venv and try to create a django project, I get the following:

/Users/justin/Desktop/Programming/Python/Django
 Projects/env/bin/django-admin: "/Users/justin/
Desktop/Programming/Python/Django: bad interpreter: No such
 file or directory

I created the venv with python3 -m venv env, I then tried to run pip install django where the above error also appeared, I then learned I should be using python3 -m pip install django (pip3: bad interpreter: No such file or directory) and this successfully installed django, but I still cannot start a project. I've ran pip install django and django-admin startproject from a venv many times without an issue so it seems like I broke something recently. Does anyone know how to fix this/where I can begin looking for the issue? Thanks for any help.

Justin
  • 1,329
  • 3
  • 16
  • 25

1 Answers1

0
Save  a copy of your project in another folder and Try again.

        OR


Step First :- RUN - python -m venv env

Step Second :- pip install django

Step Third :- after that install pip

Step Fourth :- ( If your pip version is lower, then it may be issue after 
some time and every time it will show the Warning: for upgrading the pip. 
So if version is lower then USE ) python -m pip install -U pip
Lars
  • 1,234
  • 1
  • 8
  • 31