Re: Patrick Sheehan: Major Issues with Python

2023-03-26 Thread Thomas Passin

On 3/25/2023 4:03 PM, Patrick Sheehan wrote:

Hello, I have been working with the attached book (See photo)


Photos do not come through on this list, so don't bother to attach any.
Type or copy-paste any useful text.


to try to learn Python and so far it has been a complete nightmare
trying to get python installed and operating correctly.  I have
received a plethora of error messages and consulted youtube videos
and chat groups to try to remedy the issues.  I am using a computer
that is running Windows 10.


That's too bad. Normally a Python install on Windows is trouble free.
Perhaps we can help.


I have installed, and un-installed several versions of Python


Please give more information.  What versions of Python, where did you
get it, how did you install it, what options if any did you choose
during the installation?


and was able to complete the first two lessons in the attached book,
but could not complete lesson 3 (Turtledemo)...Some of the error
messages I have received include:  "This app cannot run on your PC";
"Unable to initialize device PRN"; “Python is not recognized as an
internal or external command”: "Python was not found: run without
arguments to install from Microsoft Store, or disable this shortcut
from settings mange, app execution aliases:"


You need to tell us just what you have done.  What was this "lesson" 
supposed to do?  Did you try to run it while you were working in 
PyCharm?  Just how did you try to run the lesson?



...I have been at this
for 4 days now at least three hours each day...Any information or
help you can provide would be greatly appreciated.  Additionally, I
do have PyCharm installed (As you can tell, I am a beginner), is
PyCharm the same thing as Python?  Thank you in advance!


No, PyCharm is an editor and Python IDE; it is not the same as Python.
Python is a programming language.  The problems you have been having 
could be caused by PyCharm not being set up to work with your 
installation of Python.


To see if Python has been installed correctly, open a Windows console. 
If you don't know how, one way is to hit the Windows key and type "cmd". 
 Windows will offer "Command Prompt".  Hit the ENTER key to accept it, 
and a console window will open. (There are more convenient ways, but we 
don't need to get into them right now).


In the console window, type (without the quotes) "py -V".  You should 
see something like this (The first line is what I typed, the second line 
is the response):


C:\Users\tom>py -V
Python 3.10.9

If this works, Python has been installed and apparently working.

If it is working, save the Python program from your lesson as a file 
with a name such as such as "lesson1.py". In an open console window. try 
to run it by typing


py lesson1.py

Instead of just "lesson1.py", you will either need to change directory 
(using the cd command) to the directory that contains that file, or you 
will need to use the full path to the file.  For example, if the file is


c:\temp\python\lesson1.py

then run it by typing

py c:\temp\python\lesson1.py

Let us know how it goes.
--
https://mail.python.org/mailman/listinfo/python-list


Re: Patrick Sheehan: Major Issues with Python

2023-03-26 Thread MRAB

On 2023-03-25 20:03, Patrick Sheehan wrote:

Hello,
I have been working with the attached book (See photo) to try to learn
Python and so far it has been a complete nightmare trying to get python
installed and operating correctly.  I have received a plethora of error
messages and consulted youtube videos and chat groups to try to remedy the
issues.  I am using a computer that is running Windows 10.  I have
installed, and un-installed several versions of Python and was able to
complete the first two lessons in the attached book, but could not complete
lesson 3 (Turtledemo)...Some of the error messages I have received
include:  "This app cannot run on your PC"; "Unable to initialize device
PRN"; “Python is not recognized as an internal or external command”:
"Python was not found: run without arguments to install from Microsoft
Store, or disable this shortcut from settings mange, app execution
aliases:"...I have been at this for 4 days now at least three hours each
day...Any information or help you can provide would be greatly
appreciated.  Additionally, I do have PyCharm installed (As you can tell, I
am a beginner), is PyCharm the same thing as Python?  Thank you in advance!

This list strips attachments such as images, so I don't know which book 
you're referring to.


I'd go for Python 3.11 and the installer "Windows installer (64-bit)" at 
https://www.python.org/downloads/release/python-3112/, i.e. 
"https://www.python.org/ftp/python/3.11.2/python-3.11.2-amd64.exe; 
(assuming that it's a 64-bit PC).
To run Python, the recommended way is to use the Python Launcher, py.exe 
(so type "py my_program.py" in a Command window), or just double-click 
on it if it's a GUI program.


As for PRN, that's the printer. Does anyone use PRN these days?

And, no, PyCharm is not the same thing as Python. PyCharm is an IDE 
(integrated development environment) for Python, but Python is its own 
thing.

--
https://mail.python.org/mailman/listinfo/python-list


Re: Patrick Sheehan: Major Issues with Python

2023-03-26 Thread Mats Wichmann

On 3/25/23 14:03, Patrick Sheehan wrote:

Hello,
I have been working with the attached book (See photo) to try to learn
Python and so far it has been a complete nightmare trying to get python
installed and operating correctly.  I have received a plethora of error
messages and consulted youtube videos and chat groups to try to remedy the
issues.  I am using a computer that is running Windows 10.  I have
installed, and un-installed several versions of Python and was able to
complete the first two lessons in the attached book, but could not complete
lesson 3 (Turtledemo)...Some of the error messages I have received
include:  "This app cannot run on your PC"; "Unable to initialize device
PRN"; “Python is not recognized as an internal or external command”:
"Python was not found: run without arguments to install from Microsoft
Store, or disable this shortcut from settings mange, app execution
aliases:"...


If you installed the conventional way, use the command name "py" instead 
of "python" to run things from a command shell.  Alternatively, you 
could try an installation of Python from the Microsoft Store (as the 
little stub program named python, which Microsoft preinstalls for the 
express purpose of giving you this hint).  There are times when getting 
Python working without hassle is easier when going that route.


You *can* add python to the search PATH, there's an option in the 
installer (you can rerun this from the Apps & features Settings 
applet)... in the screen for advanced options there's something that 
says "Add python to environment variables" or similar wording.


>I have been at this for 4 days now at least three hours each

day...Any information or help you can provide would be greatly
appreciated.  Additionally, I do have PyCharm installed (As you can tell, I
am a beginner), is PyCharm the same thing as Python? 


No. It's an "integrated development environment" - editor, debugger, 
source control wrangler and many other things.  It still needs to have a 
working Python installed. It will probably find the installed Python 
more easily than you will.  The concept of an IDE is you can do all your 
programming work without leaving it - you don't have to hop between 
editor, command line, and invoke other tools.  PyCharm is only one of 
many entrants in this space for Python programmers.  It's excellent, but 
I find it rather, ummm, "bulky", for beginners - there are a ton of 
features you'll not use early on in your journey, and thus I find it 
makes it much harder to find the things you do need in menus, help, etc. 
Up to you whether you push ahead with using it now, or leave it for a 
bit later when you're doing more complex things.


We have no idea what book you're using, by the way, as the list strips 
images and other attachments.  In any case, there are hundreds of Python 
books out now, most of us don't know about a particular one (unless we 
wrote it :) )



--
https://mail.python.org/mailman/listinfo/python-list


Patrick Sheehan: Major Issues with Python

2023-03-26 Thread Patrick Sheehan
Hello,
I have been working with the attached book (See photo) to try to learn
Python and so far it has been a complete nightmare trying to get python
installed and operating correctly.  I have received a plethora of error
messages and consulted youtube videos and chat groups to try to remedy the
issues.  I am using a computer that is running Windows 10.  I have
installed, and un-installed several versions of Python and was able to
complete the first two lessons in the attached book, but could not complete
lesson 3 (Turtledemo)...Some of the error messages I have received
include:  "This app cannot run on your PC"; "Unable to initialize device
PRN"; “Python is not recognized as an internal or external command”:
"Python was not found: run without arguments to install from Microsoft
Store, or disable this shortcut from settings mange, app execution
aliases:"...I have been at this for 4 days now at least three hours each
day...Any information or help you can provide would be greatly
appreciated.  Additionally, I do have PyCharm installed (As you can tell, I
am a beginner), is PyCharm the same thing as Python?  Thank you in advance!

Respectfully,
Patrick Sheehan
-- 
https://mail.python.org/mailman/listinfo/python-list