starting a website project in python and django in windows 10 - python

Whenever I type django-admin start project project name the console returns Django-admin : The term 'Django-admin' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
Django-admin start project emart
+ CategoryInfo : ObjectNotFound: (Django-admin:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException.

The correct syntax is $ django-admin startproject mysite
Also, make sure to have the Python envirovment you want to use (the one with Django installed) active
Check the official documentation for Django

Related

I cannot use Django

I want to use Django. I installed it but after that I wanted to create file and I got this error.
django-admin.exe startproject mysite .
django-admin.exe : The term 'django-admin.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path wa
s included, verify that the path is correct and try again.
At line:1 char:2
+ django-admin.exe startproject mysite .
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (django-admin.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
what is the problem?

I want to create a virtual environment for Django project but when I do pip install Django it says requirement already satisfied

Every time I start a Django Project with django-admin startproject projectName I am getting this error:
PS F:\Going back to backend> django-admin startproject lecture3
django-admin : The term 'django-admin' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is correct and
try again.

How do I run pipenv, if I always get the same error?

I'm trying to run 'pipenv' on Windows 10, and it doesn't want to run... The error is receive is below
PS C:\Users\charl\Documents\Python\Face Recognition> pipenv shell
pipenv : The term 'pipenv' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ pipenv shell
+ ~~~~~~
+ FullyQualifiedErrorId : CommandNotFoundException```
Use python -m pipenv instead of just pipenv, it should work. Best of luck to you.

trouble creating virtual environment for python 3 in windows 10

I want to create a virtualenv in Windows 10 for python 3.7
I'm trying to follow the instruction from python doc
So first I entered the command
PS T:\python -m venv c:\path\to\myenv
it did create directories and files into that path
then according to the documentation, using PowerShell I entered:
PS T:\path\to\myenv\Scripts\Activate.ps1
but I got the following:
The term
'T:\path\to\myenv\Scripts\Activate.ps1' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
+ T:\path\to\myenv\Scripts\Activate.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (T:\path\to\myenv...ts\Activate.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
What am I missing
you should replace
path\to\myenv
to your actual path
so as said in docs
C:\> <venv>\Scripts\Activate.ps1
for example it should be something like
C:\>MyProjectsFolder\first_project\venv\Scripts\Activate.ps1
the other workaround is to manually change directories to Scripts folder and then run
Activate.ps1
if it didnt solve your problem please specify your project folder and structure

Django Dynamic Scraper Project does not run on windows even though it works on Linux

I am trying to make a project in dynamic django scraper. I have tested it on linux and it runs properly. When I try to run the command: syndb i get this error
/*****************************************************************************************************************************/
python : WindowsError: [Error 3] The system cannot find the path specified: 'C:\Python27\l
ib\site-packages\django_dynamic_scraper-0.3.0-py2.7.egg\dynamic_scraper\migrations/.'
At line:1 char:1
+ python manage.py syncdb
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (WindowsError: [...migrations/.':String) [],
RemoteException
+ FullyQualifiedErrorId : NativeCommandError
/*****************************************************************************************************************************/
The admin server runs properly with the command python manage.py runserver
Kindly guide me how i can remove this error
Step # 1
download django-dynamic-scraper-0.3.0-py2.7.tar.gz file
Step # 2
Unzip it and change the name of the folder to:
django-dynamic-scraper-0.3.0-py2.7.egg
Step # 3
paste the folder into C:\Python27\Lib\site-packages

Categories

Resources