On 08/30/2018 02:54 AM, Alan Gauld via Tutor wrote:
> On 30/08/18 00:09, Roger Lea Scherer wrote:
>> I'm trying to implement a local host. My instructions tell me to type the
>> following command in the command line, make sure I'm in the "www" folder
> 
> So this is not the folder where python3 is installed. (See below)
> 
>> python3 -m http.server --cgi 8000
> 
>> I'm running Anaconda in Windows 10. I get an error: 'python3' is not
>> recognized as an internal or external command, operable program or batch
>> file.
>> But this is the folder that I thought Python 3.6 was in.
> 
> you said you were in www which is not where Python should
> be installed.
> 
> It is likely that Python is not in your system PATH.
> You need to find out where it is installed and add it.
> In a standard Python install it would either be in
> C:\PROGRAM FILES\PYTHON or
> C:\PYTHON
> 
> But Anaconda (version please?) could use its own path
> such as
> 
> C:\ANACONDA\PYTHON
> 
>> So how do I correct this? I suspect python3 isn't in this folder. I know I
>> have python3 because I run python3.6 shell practically every day. 
> 
> How do you run it?
>>From a command line or via a menu/shortcut?
> 
>> looked in the Program Files folder, came up empty as far as python is
>> concerned, but I don't know where else to look?

Several things that could help:

you can ask python itself to tell you where it is, since you say python
works for you.

    >>> import sys
    >>> print(sys.executable)

the standard Windows python defaults to a "user install", so it could be
in a place like

{yourhomdirectory}/AppData/Local/Programs/Python

Anaconda, as Alan says, likely puts it somewhere different.

Python 3 isn't named python3 on Windows unless you take steps to make it
so, it's just called python.  So modify your instructions accordingly.

Also on Windows, if it was installed, there is a separate thing called
the Python Launcher, which lets you run the command "py" which typically
gets put in a place that is always found, and avoids the fiddling with
getting Python itself into your PATH.  But I'm unsure whether the
Anaconda install actually installs that. You could try... just type: py


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to