tutorial 1 problems from djangoproject website - not working, do not exactly understand

165 views
Skip to first unread message

Paul Kagan

unread,
Mar 22, 2022, 9:13:02 AM3/22/22
to Django users
root@videotron:~ # django-admin startproject mysite
root@videotron:~ # python manage.py runserver
python: can't open file 'manage.py': [Errno 2] No such file or directory
root@videotron:~ # ls
.Xauthority     .elinks         .nn             .viminfo        git
.cache          .emacs.d        .npm            .virtualenvs    mbox
.cargo          .k5login        .profile        .vnc            mysite
.composer       .local          .rnd            .weechat
.config         .login          .shrc           about.txt
.cshrc          .mysql_history  .thelounge      ca.key
root@videotron:~ # cd mysite
root@videotron:~/mysite # ls
manage.py       mysite
root@videotron:~/mysite # python manage.py runserver
Traceback (most recent call last):
  File "manage.py", line 11, in main
    from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 17, in main
    ) from exc
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
root@videotron:~/mysite # ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
-sh: ImportError:: not found
root@videotron:~/mysite # python
Python 3.7.10 (default, Apr 10 2021, 01:41:46)
[Clang 11.0.1 (g...@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c on freebsd13
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'django'
>>> import django
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'django'
>>> exit()
root@videotron:~/mysite #

harsh jain

unread,
Mar 24, 2022, 8:48:43 AM3/24/22
to Django users
Still facing issue ?
This course will help you -  Advanced web development course online

Kasper Laudrup

unread,
Mar 24, 2022, 9:51:53 AM3/24/22
to django...@googlegroups.com
On 24/03/2022 08.05, harsh jain wrote:
> Still facing issue ?
> This course will help you - Advanced web development course online
>

Please fuck off with your spam.

Samapika Nayak

unread,
Mar 24, 2022, 10:18:56 AM3/24/22
to Django users
create a virtual env, install django

Shah Tech

unread,
Mar 24, 2022, 10:18:56 AM3/24/22
to Django users
you must first your current directory to your project directory mysite:
in window type: cd mysite
and then try python manage.py runserver

Reply all
Reply to author
Forward
0 new messages