You are not logged in.
Hi all.
I am Node developer learning Django.
I am getting the following error while creating a new django project:
I have installed all the prerequisites including django using this guide django tutorial.
I am on a fresh arch installation.
What could be the possible cause?
Thanks in advance
Last edited by akmann (2018-06-15 10:36:44)
Offline
$ django-admin startproject django_project The program 'django-admin' is currently not installed. You can install it by typing: sudo apt install python-django-common
...
I am on a fresh arch installation.
Excuse me, but that doesn't look like Arch Linux at all.
How exactly did you install the prerequisites?
Last edited by ayekat (2018-06-14 12:13:54)
Offline
Excuse me, but that doesn't look like Arch Linux at all.
Yeah, I am guessing Debian. Closed. Dustbinned.
akmann, If I am wrong, and you are running Arch, report this thread and drop the moderators an explanation.
Edit: I saw your report, please update your first post with the correct output. Re-opening and moving to "Applications and Desktop Environments"
Last edited by ewaller (2018-06-14 14:36:28)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
What could be possible causes:
- that you are in a venv - I don't know, maybe you cannot access other python things which are not installed into said virtual environment
- maybe you want django-admin.py – although, no, that should not be the cause
Offline
I have tried to replicate steps on Ubuntu, and it works like charm, but for some reason, it doesn't on Arch.
I am struggling with this issue for 2 days but haven't found any workaround.
Offline
django-admin works for me here in a virtual env. I used the builtin version in python3, though.
(pacman -S python)
mkdir -p /tmp/project
cd /tmp/project
python -m venv pythonenv
source pythonenv/bin/activate
pip install django==1.11
django-admin startproject django-project
deactivate
Last edited by progandy (2018-06-16 07:01:02)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
django-admin works for me here in a virtual env. I used the builtin version in python3, though.
(pacman -S python) mkdir -p /tmp/project cd /tmp/project python -m venv pythonenv source pythonenv/bin/activate pip install django==1.11 django-admin startproject django-project deactivate
You installed django with pip into the venv. I wonder if it would generally not work if you installed the Archlinux package instead (which lies outside the venv)
EDIT:
I have tried to replicate steps on Ubuntu, and it works like charm, but for some reason, it doesn't on Arch.
Ubuntu uses by default python2, arch python3. This also reflects in a different naming scheme.
The ubuntu package python-django is the python2 package, while in Arch it is the python3 package.
The python2 package is python2-django, and to not clash with the python3 package the command in question has been renamed to django-admin2
That said, django did drop support for python 2 with version 2.0, the python 2 variant remains at version 1.11. Python 3 has been out for 10 years.
Last edited by RoundCube (2018-06-16 16:21:55)
Offline
I reinstalled arch and now everything works as expected.
Offline