'Cann't install django with error 'Non-zero exit code (2)'
When i create new django project in pycharm i have error enter image description here
Help me please
Solution 1:[1]
To not make project in the venv/Scripts/
directory, add path while executing django-admin startproject [project-name-that-you-want] [project-directory-path]
this command.
This will let you have your django project in the directory you want, so that your project directory looks like the ones that you can find in tutorial videos.
Solution 2:[2]
As you can see, PyCharm has given you a "proposed solution", so use that.
Basically, PyCharm is trying to add, or you have tried to add, a --build-dir
argument to the pip command but pip doesn't know what --build-dir
means.
Open your Terminal/Command Prompt, cd
into your project directory and run pip install django
.
Solution 3:[3]
Open Pycharm settings and go to Interpreter settings File->Settings->Project->Project Interpreter
and click
the +
button on right side, then find django
and
install it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Brad Lee |
Solution 2 | HeyHoo |
Solution 3 | Ali Aref |