Home > OS >  Not able to install django and use an existing django project
Not able to install django and use an existing django project

Time:02-17

I am studying Django for the first time and everything was going well until the last day. Today when I tried opening my Django project, the terminal returns an error saying :-

Unable to create process using
'C:\Users\User1\AppData\Local\Programs\Python\Python310\python.exe manage.py runserver'

Thinking that it might be an issue with the virtual env, I tried checking my Python Interpreter to make sure I am currently in my venv.

Fortunately, I am currently using my venv but Pycharm indicates me to Install Python Packaging Tools.

I tried the link to install it but it notifies a Non Zero Exit Code(101) and Invalid Python SDK error.

Googling for the error asked me to check the path in Environment Variables where two are present -

C:\Users\User1\AppData\Local\Programs\Python\Python310\

C:\Users\User1\AppData\Local\Programs\Python\Python310\Scripts\

Recently I had added MingW Compiler to the path and that was it. I've never touched the path of Python.

I would like to mention that there are no errors in creating a new virtual envirnoment nor activating it. But things get worse when I try to pip install django. CMD tells that unable to create process.

Please help! I am actually stuck with my project.

CodePudding user response:

first, try to run any python file(not in your project) if it works then the problem is with your django project or the env(try to create a new env and move your files to it) else I think you should reinstall python this will fix the problem I guess

CodePudding user response:

Happy to say that I have fixed the issue.

Steps followed include :

  1. Uninstalled Python,Deleted Path,Restarted my pc
  2. Downloaded and Installed Python 3.10.2 from the official site.
  3. Upgraded pip
  4. Installed virtualenv using pip install virtualenv
  5. Tested it creating env using - py -m venv "environment name"
  6. pip install django works started a project and the setup was successful.enter image description here
  • Related