problem at installing phyton on windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gslm

    problem at installing phyton on windows

    Hi!
    I'm too new on phyton.I have installed phyton.But when I write phyton
    command, unfortunately, i can't run.I suppose that it is bacause of
    setting path.But i can't solve.
    Can you help?

    Another thing is, when i double click the .py file, there are the
    project form and the command line.How can i provide to view only the
    project?
    Thanks...

  • Paul Boddie

    #2
    Re: problem at installing phyton on windows

    gslm wrote:
    Hi!
    I'm too new on phyton.I have installed phyton.But when I write phyton
    command, unfortunately, i can't run.I suppose that it is bacause of
    setting path.But i can't solve.
    Can you help?
    It's "python" you should be typing, of course. If that doesn't work
    then it may be a PATH issue, yes.
    Another thing is, when i double click the .py file, there are the
    project form and the command line.How can i provide to view only the
    project?
    I think you need to rename the .py file so that it ends with .pyw -
    this stops the command line window from opening, but it's only useful
    if you are running a graphical program, obviously.

    Paul

    Comment

    • gslm

      #3
      Re: problem at installing phyton on windows

      On 25 Mart, 20:16, "Paul Boddie" <p...@boddie.or g.ukwrote:
      gslm wrote:
      Hi!
      I'm too new on phyton.I have installed phyton.But when I write phyton
      command, unfortunately, i can't run.I suppose that it is bacause of
      setting path.But i can't solve.
      Can you help?
      >
      It's "python" you should be typing, of course. If that doesn't work
      then it may be a PATH issue, yes.
      >
      Another thing is, when i double click the .py file, there are the
      project form and the command line.How can i provide to view only the
      project?
      >
      I think you need to rename the .py file so that it ends with .pyw -
      this stops the command line window from opening, but it's only useful
      if you are running a graphical program, obviously.
      >
      Paul
      First, thaks a lot.
      But I'm sorry.I haven't understood what i must do for ruunnig phyton
      command.I delete path from proportiesof my computer.Then i open
      command line of phyton.But when i write phyton these view below:
      Traceback<most recent call last>:
      File "<stdin>"; line 1 in <module>
      NameError: name phyton is not defined
      Sorry may be you think i'm comic but i am not be able to correct.

      Comment

      • tac-tics

        #4
        Re: problem at installing phyton on windows

        On Mar 25, 1:06 pm, "gslm" <slm_gu...@hotm ail.comwrote:
        Hi!
        I'm too new on phyton.I have installed phyton.But when I write phyton
        command, unfortunately, i can't run.I suppose that it is bacause of
        setting path.But i can't solve.
        Can you help?
        You need to set what is called your PATH environment variable. See:

        and add C:\python\ (or wherever your python package is installed) to
        your PATH.
        >
        Another thing is, when i double click the .py file, there are the
        project form and the command line.How can i provide to view only the
        project?
        I don't quite understand what you're asking here.

        Comment

        • Gabriel Genellina

          #5
          Re: problem at installing phyton on windows

          En Sun, 25 Mar 2007 15:40:14 -0300, gslm <slm_guzel@hotm ail.comescribió :
          But I'm sorry.I haven't understood what i must do for ruunnig phyton
          command.I delete path from proportiesof my computer.Then i open
          command line of phyton.But when i write phyton these view below:
          Traceback<most recent call last>:
          File "<stdin>"; line 1 in <module>
          NameError: name phyton is not defined
          Sorry may be you think i'm comic but i am not be able to correct.
          So, you *already* have started the Python interpreter. You don't have to
          type any more thing to start!
          If you see a console like this:

          Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
          on win
          32
          Type "help", "copyright" , "credits" or "license" for more information.
          >>>
          you are inside the Python interpreter.
          You may use IDLE, an integrated editor+debugger +other things (Start menu,
          All programs, Python, Idle).
          Or install the Python for Windows extensions, by Mark Hammond, that comes
          with its own editor (PythonWin) and may be better suited for a Windows
          environment https://sourceforge.net/projects/pywin32/
          Try reading some introductory texts. The book "Dive into Python" may be
          useful: www.diveintopython.org
          There is a wiki with more resources: http://wiki.python.org/moin/

          --
          Gabriel Genellina

          Comment

          • Hertha Steck

            #6
            Re: problem at installing phyton on windows

            gslm schrieb:
            First, thaks a lot.
            But I'm sorry.I haven't understood what i must do for ruunnig phyton
            command.I delete path from proportiesof my computer.Then i open
            command line of phyton.But when i write phyton these view below:
            Traceback<most recent call last>:
            File "<stdin>"; line 1 in <module>
            NameError: name phyton is not defined
            Such an answer comes from Python, I think you must already be in the
            interactive interpreter. Do you see something similar to this, with your
            cursor after the ">>>"?

            Python 2.5 (r25:51908, Oct 6 2006, 15:22:41)
            [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu4)] on linux2
            Type "help", "copyright" , "credits" or "license" for more information.
            >>>
            At this point you can enter valid Python statements, but you can't call
            Python from Python (wouldn't make sense anyway).

            I'd look at this page first:



            HTH
            Hertha

            Comment

            • gslm

              #7
              Re: problem at installing phyton on windows

              Please, can you read again?
              Yes, I understand that in phyton interpreter, i can't call phyton
              command.Thanks. ..

              But how can i run '.py' files from this command line?I wanted to use
              the phyton command for this.

              When i click a py extended file, for example calendar.py in lib
              directory, file opens, then suddenly close,except graphical ones.Why?
              How can i see the results?

              And where can i learn which library must i import for whic class?

              Sorry, i ask much:(But after learning these starting knowledeges, i
              read tutorials, manuals etc.
              But now i haven't found my answers yet.
              Regards...

              Comment

              • Stephen Eilert

                #8
                Re: problem at installing phyton on windows

                On Mar 25, 6:23 pm, "gslm" <slm_gu...@hotm ail.comwrote:
                Please, can you read again?
                Yes, I understand that in phyton interpreter, i can't call phyton
                command.Thanks. ..
                >
                But how can i run '.py' files from this command line?I wanted to use
                the phyton command for this.
                >
                When i click a py extended file, for example calendar.py in lib
                directory, file opens, then suddenly close,except graphical ones.Why?
                How can i see the results?
                >
                And where can i learn which library must i import for whic class?
                >
                Sorry, i ask much:(But after learning these starting knowledeges, i
                read tutorials, manuals etc.
                But now i haven't found my answers yet.
                Regards...
                For god's sake. It's PYTHON, not PHYTON.

                Use IDLE and run your files from there. That way you won't have to
                mess with the hideous windows console.

                However, if you really want to use the windows console, keep in mind
                that it will always close automatically when the program ends. That is
                true for Python, C, whatever, unless it was open before. So, Start-
                >run, type "cmd" then run python filename.py. If that does not work,
                it's because the path is not set correctly.

                And that's probably because you keep mispelling Python. See below:

                " But I'm sorry.I haven't understood what i must do for ruunnig phyton
                command.I delete path from proportiesof my computer.Then i open
                command line of phyton.But when i write phyton these view below:
                Traceback<most recent call last>:
                File "<stdin>"; line 1 in <module>
                NameError: name phyton is not defined "
                ^^^^^^^

                Obviously, "Phyton" will never be defined.


                Stephen




                Comment

                • Steve Holden

                  #9
                  Re: problem at installing phyton on windows

                  gslm wrote:
                  Please, can you read again?
                  Yes, I understand that in phyton interpreter, i can't call phyton
                  command.Thanks. ..
                  >
                  But how can i run '.py' files from this command line?I wanted to use
                  the phyton command for this.
                  >
                  When i click a py extended file, for example calendar.py in lib
                  directory, file opens, then suddenly close,except graphical ones.Why?
                  How can i see the results?
                  >
                  And where can i learn which library must i import for whic class?
                  >
                  Sorry, i ask much:(But after learning these starting knowledeges, i
                  read tutorials, manuals etc.
                  But now i haven't found my answers yet.
                  Regards...
                  >


                  regards
                  Steve
                  --
                  Steve Holden +44 150 684 7255 +1 800 494 3119
                  Holden Web LLC/Ltd http://www.holdenweb.com
                  Skype: holdenweb http://del.icio.us/steve.holden
                  Recent Ramblings http://holdenweb.blogspot.com

                  Comment

                  • Paul Boddie

                    #10
                    Re: problem at installing phyton on windows

                    gslm wrote:
                    Please, can you read again?
                    Yes, I understand that in phyton interpreter, i can't call phyton
                    command.Thanks. ..
                    >
                    But how can i run '.py' files from this command line?I wanted to use
                    the phyton command for this.
                    Once you are in the Python interpreter you can run Python files, but
                    the best way to run files is one of the following:

                    * From the command prompt (DOS prompt); type something like this:

                    python file.py

                    * In the file manager (Windows Explorer, not Internet Explorer), open/
                    run file.py.

                    If you *really* want to run files in the interpreter, you can do
                    something like this:

                    execfile("file. py")
                    When i click a py extended file, for example calendar.py in lib
                    directory, file opens, then suddenly close,except graphical ones.Why?
                    How can i see the results?
                    For things that don't open windows you really need to run them from
                    the command prompt.
                    And where can i learn which library must i import for whic class?
                    Look at the library reference: each of the listed libraries are named,
                    and for the calendar module you'd put this in your program (or type it
                    at the Python prompt):

                    import calendar

                    Note that in Python programs or at the Python prompt you do not refer
                    to it as calendar.py or C:\Python24\Lib \calendar.py (or wherever it
                    lives): Python knows where to look and knows to add the .py on the end
                    of the file.

                    Note also that this doesn't run the calendar module, so it isn't quite
                    the same as running the calendar.py file as described above.
                    Sorry, i ask much:(But after learning these starting knowledeges, i
                    read tutorials, manuals etc.
                    But now i haven't found my answers yet.
                    I hope this helps a little.

                    Paul

                    Comment

                    • bryan rasmussen

                      #11
                      Re: problem at installing phyton on windows

                      >
                      Obviously, "Phyton" will never be defined.
                      >
                      Indeed I remember in the climactic showdown between Phyton and the
                      rest of the gamma ranger FooDroids and he kept doing the mega kick
                      move. and I was thinking wow Phyton will never be defined, he will
                      just keep kicking ass.

                      I hear they're gonna make a Phyton Commandant movie.

                      Cheers,
                      Bryan Rasmussen

                      Comment

                      • gslm

                        #12
                        Re: problem at installing phyton on windows

                        On 26 Mart, 00:50, "Stephen Eilert" <spedr...@gmail .comwrote:
                        On Mar 25, 6:23 pm, "gslm" <slm_gu...@hotm ail.comwrote:
                        >
                        >
                        >
                        >
                        >
                        Please, can you read again?
                        Yes, I understand that in phyton interpreter, i can't call phyton
                        command.Thanks. ..
                        >
                        But how can i run '.py' files from this command line?I wanted to use
                        the phyton command for this.
                        >
                        When i click a py extended file, for example calendar.py in lib
                        directory, file opens, then suddenly close,except graphical ones.Why?
                        How can i see the results?
                        >
                        And where can i learn which library must i import for whic class?
                        >
                        Sorry, i ask much:(But after learning these starting knowledeges, i
                        read tutorials, manuals etc.
                        But now i haven't found my answers yet.
                        Regards...
                        >
                        For god's sake. It's PYTHON, not PHYTON.
                        >
                        Use IDLE and run your files from there. That way you won't have to
                        mess with the hideous windows console.
                        >
                        However, if you really want to use the windows console, keep in mind
                        that it will always close automatically when the program ends. That is
                        true for Python, C, whatever, unless it was open before. So, Start->run, type "cmd" then run python filename.py. If that does not work,
                        >
                        it's because the path is not set correctly.
                        >
                        And that's probably because you keep mispelling Python. See below:
                        >
                        " But I'm sorry.I haven't understood what i must do for ruunnig phyton
                        command.I delete path from proportiesof my computer.Then i open
                        command line of phyton.But when i write phyton these view below:
                        Traceback<most recent call last>:
                        File "<stdin>"; line 1 in <module>
                        NameError: name phyton is not defined "
                        ^^^^^^^
                        >
                        Obviously, "Phyton" will never be defined.
                        >
                        Stephen- Alýntýyý gizle -
                        >
                        - Alýntýyý göster -
                        Thanks to all of you!Sorry, I must be more careful!
                        You're right, my problem is of course this:writing the word python
                        wrong.
                        Now it's ok!Thanks again and again!

                        Comment

                        Working...