Fwd: Issues with python commands in windows powershell

Thomas Jollans tjol at tjol.eu
Thu Sep 21 05:18:46 EDT 2017


On 2017-09-20 21:52, Terry Reedy wrote:
> On 9/20/2017 1:09 PM, Joey Steward wrote:
>> ---------- Forwarded message ----------
>> From: Joey Steward <jsteward2930 at gmail.com>
>> Date: Tue, Sep 19, 2017 at 10:30 PM
>> Subject: Issues with python commands in windows powershell
>> To: python-list at python.org
>>
>>
>> Hello,
>>
>> I've been having issues using basic python commands in windows
>> powershell.
>> I'm new to programming so just going off of online tutorials.
>>
>> Earlier I was unable to use pip to install Django (pip install
>> Django), and
>> came to this forum for help and someone was able to give me the correct
>> command for windows 10 (py -m pip install django).
>>
>> I've been trying to run this command django-admin startproject
>> mytests, but
>> get the same error message as when trying to run the original pip
> 
> Try py -m django-admin startproject mytests.  If this does not work, ask
> on django lists.

I doubt that will work; "django-admin" is not a valid module name.


Joey, there should be a folders called "bin" and "scripts" (or something
like that) in your Python installation. One of them, I expect, will
contain a django-admin.exe. (Or .bat? Or .cmd? Whatever.)
Adding these folders to your PATH environment variable (don't ask me
how) will solve these problems. IIRC you can do this for PowerShell
specifically or for Windows in general, whichever you think is best.

> 
>> 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 startproject mytestsite
>> + ~~~~~~~~~~~~
>>      + CategoryInfo          : ObjectNotFound: (django-admin:String) [],
>> CommandNotFoundException
>>      + FullyQualifiedErrorId : CommandNotFoundException
>>
>>
>> I'm very new so honestly have no idea what the issue may be, but from
>> previously trying to use python I think it may have something to do with
>> configuring windows environment variables? Not sure, but just something
>> I've ran into in the past previous times trying to learn python for more
>> data analysis purposes.
>>
>> Any help would be greatly appreciated!
>>
>> Thanks a lot,
>>
>> Joey Steward
>>
> 
> 


-- 
Thomas Jollans



More information about the Python-list mailing list