Django-admin startproject

I am new to django and I tried to create a project with django-admin startproject command. The tutorial I was referring to had no errors while going through this command but I get the following error. The tutorial and I are not doing it in any virtual environment. Though this error comes, the files and folder is created in the directory I am working in, how should I solve this error?

Traceback (most recent call last): File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in run_module_as_main return run_code(code, main_globals, None, File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\username\AppData\Local\Programs\Python\Python39\Scripts\django-admin.exe_main.py", line 7, in <module> File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management_init.py", line 446, in execute_from_command_line utility.execute() File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management_init.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\base.py", line 402, in run_from_argv self.execute(*args, **cmd_options) File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\base.py", line 448, in execute output = self.handle(*args, **options) File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\commands\startproject.py", line 21, in handle super().handle("project", project_name, target, **options) File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\templates.py", line 225, in handle run_formatters([top_dir]) File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\utils.py", line 165, in run_formatters
subprocess.run( File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 501, in run with Popen(*popenargs, **kwargs) as process: File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 947, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1416, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, PermissionError: [WinError 5] Access is denied

Back to Top