Patrick Sheehan: Major Issues with Python

Thomas Passin list1 at tompassin.net
Sun Mar 26 09:45:25 EDT 2023


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.


More information about the Python-list mailing list