How can I figure this out when working with Django :can't open file '/home/student/back_ends/venv': [Errno 2] No such file or directory
Asked
Active
Viewed 336 times
-1
-
1What is unclear about the error message? – Sayse Jul 30 '21 at 08:59
1 Answers
0
I have done all the setup on cmd and copied all my commands if you any issue you found ask me Moreover kindly set environment variable in accordance to and check it out on google Microsoft Windows [Version 10.0.19043.1110] (c) Microsoft Corporation. All rights reserved.
C:\Users\Dell>python --version
Python 3.8.5
C:\Users\Dell>django --version
'django' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Dell>pip --version
pip 20.2.4 from C:\Users\Dell\anaconda3\lib\site-packages\pip (python 3.8)
C:\Users\Dell>pip install virtualenv
Collecting virtualenv
Downloading virtualenv-20.6.0-py2.py3-none-any.whl (5.3 MB)
|████████████████████████████████| 5.3 MB 45 kB/s
Requirement already satisfied: filelock<4,>=3.0.0 in c:\users\dell\anaconda3\lib\site-packages (from virtualenv) (3.0.12)
Requirement already satisfied: six<2,>=1.9.0 in c:\users\dell\anaconda3\lib\site-packages (from virtualenv) (1.15.0)
Collecting platformdirs<3,>=2
Downloading platformdirs-2.0.2-py2.py3-none-any.whl (10 kB)
Collecting backports.entry-points-selectable>=1.0.4
Downloading backports.entry_points_selectable-1.1.0-py2.py3-none-any.whl (6.2 kB)
Collecting distlib<1,>=0.3.1
Downloading distlib-0.3.2-py2.py3-none-any.whl (338 kB)
|████████████████████████████████| 338 kB 76 kB/s
Installing collected packages: platformdirs, backports.entry-points-selectable, distlib, virtualenv
Successfully installed backports.entry-points-selectable-1.1.0 distlib-0.3.2 platformdirs-2.0.2 virtualenv-20.6.0
C:\Users\Dell>python -m venv DjangoFolder
C:\Users\Dell>DjangoFolder\Scripts\activate
(DjangoFolder) C:\Users\Dell>python -m pip install django
Collecting django
Using cached Django-3.2.5-py3-none-any.whl (7.9 MB)
Collecting pytz
Using cached pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting sqlparse>=0.2.2
Using cached sqlparse-0.4.1-py3-none-any.whl (42 kB)
Collecting asgiref<4,>=3.3.2
Using cached asgiref-3.4.1-py3-none-any.whl (25 kB)
Installing collected packages: pytz, sqlparse, asgiref, django
Successfully installed asgiref-3.4.1 django-3.2.5 pytz-2021.1 sqlparse-0.4.1
WARNING: You are using pip version 20.1.1; however, version 21.2.1 is available.
You should consider upgrading via the 'C:\Users\Dell\DjangoFolder\Scripts\python.exe -m pip install --upgrade pip' command.
(DjangoFolder) C:\Users\Dell>DjangoFolder\Scripts\python.exe -m pip install --upgrade pip
Collecting pip
Downloading pip-21.2.1-py3-none-any.whl (1.6 MB)
|████████████████████████████████| 1.6 MB 49 kB/s
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.1.1
Uninstalling pip-20.1.1:
Successfully uninstalled pip-20.1.1
Successfully installed pip-21.2.1
(DjangoFolder) C:\Users\Dell>cd DjangoFolder
(DjangoFolder) C:\Users\Dell\DjangoFolder>cd lib
(DjangoFolder) C:\Users\Dell\DjangoFolder\Lib>cd site-packages
(DjangoFolder) C:\Users\Dell\DjangoFolder\Lib\site-packages>python -m django --version
3.2.5
(DjangoFolder) C:\Users\Dell\DjangoFolder\Lib\site-packages>cd ..
(DjangoFolder) C:\Users\Dell\DjangoFolder\Lib>cd ..
(DjangoFolder) C:\Users\Dell\DjangoFolder>python -m startproject mysite
C:\Users\Dell\DjangoFolder\Scripts\python.exe: No module named startproject
(DjangoFolder) C:\Users\Dell\DjangoFolder>cd mysite
The system cannot find the path specified.
(DjangoFolder) C:\Users\Dell\DjangoFolder>python -m django startproject mysite
(DjangoFolder) C:\Users\Dell\DjangoFolder>cd mysite
(DjangoFolder) C:\Users\Dell\DjangoFolder\mysite>python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
July 25, 2021 - 23:49:45
Django version 3.2.5, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
(DjangoFolder) C:\Users\Dell\DjangoFolder\mysite>python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_000`enter code here`2... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying auth.0012_alter_user_first_name_max_length... OK
Applying sessions.0001_initial... OK
(DjangoFolder) C:\Users\Dell\DjangoFolder\mysite>python manage.py makemigrations
No changes detected
(DjangoFolder) C:\Users\Dell\DjangoFolder\mysite>python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
July 25, 2021 - 23:50:46
Django version 3.2.5, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK
[25/Jul/2021 23:53:33] "GET / HTTP/1.1" 200 10697
[25/Jul/2021 23:53:34] "GET /static/admin/css/fonts.css HTTP/1.1" 200 423
[25/Jul/2021 23:53:35] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1" 200 86184
[25/Jul/2021 23:53:35] "GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1" 200 85876
[25/Jul/2021 23:53:35] "GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1" 200 85692
Not Found: /favicon.ico
[25/Jul/2021 23:53:37] "GET /favicon.ico HTTP/1.1" 404 2110[enter image description here][1]

Expert504
- 217
- 1
- 12