Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'syntax': 0.04; 'executable': 0.09; 'line:': 0.09; 'scripts,': 0.09; 'setup.py': 0.09; 'subject:script': 0.09; 'windows,': 0.09; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'guessing': 0.16; 'subject:install': 0.16; 'subject:run': 0.16; 'syntaxerror:': 0.16; 'followed': 0.16; 'appropriate': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'command': 0.22; 'programming': 0.22; 'cc:addr:python.org': 0.22; 'install': 0.23; 'mon,': 0.24; 'cc:2**0': 0.24; 'this:': 0.26; 'second': 0.26; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'absolute': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; '13,': 0.31; 'directly,': 0.31; 'languages': 0.32; 'regular': 0.32; 'run': 0.32; 'url:python': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'version': 0.36; 'found.': 0.36; 'ryan': 0.36; "didn't": 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'should': 0.36; 'rather': 0.38; 'itself': 0.39; 'success.': 0.39; 'easy': 0.60; 'commands': 0.60; "you're": 0.61; 'first': 0.61; "you've": 0.63; 'invalid': 0.68; 'prompt': 0.68; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=L08lWQxnC4ln18ry4VMMb/i8OJdWeQXjXQsmgy3qPi4=; b=USyvq6apn5PPzXqUnGyWR1sjCkmIgnegoDe410wd8WLbwOq2oQk26In+Unv6KeWlsP tElXVubcJrJ1VcbbPRMXAWMWyw+KIiLFPaTeXgsfJtRFiG/RE1LL21Xe8F5cZb1sTTEW xN6QVvApYEZVy7ozUCzQDhyxldZpoMtIvOR2JI4Ck+Jw30kQQPymkQRZ4KaVBQXcsuP1 P7ZDeJcIZgYIBjr++y0qo1DYOOzHHodx84LUF+fTXE1prH5YrzPq9vD3lZhjgDFHRNW2 Jg3R9qg6K3XeI8UyGT56m28PnjVf7Om2ill7jAujWyy9aXUULuX2jwryFKw8QmECV5+D SIwA== MIME-Version: 1.0 X-Received: by 10.42.47.137 with SMTP id o9mr31727433icf.58.1413145658627; Sun, 12 Oct 2014 13:27:38 -0700 (PDT) In-Reply-To: <9e37d62a-9391-44fc-8fa2-089ae81acfc5@googlegroups.com> References: <9e37d62a-9391-44fc-8fa2-089ae81acfc5@googlegroups.com> Date: Mon, 13 Oct 2014 07:27:38 +1100 Subject: Re: How to install and run a script? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1413145667 news.xs4all.nl 2841 [2001:888:2000:d::a6]:51464 X-Complaints-To: abuse@xs4all.nl Path: csiph.com!usenet.pasdenom.info!bete-des-vosges.org!feed.ac-versailles.fr!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Xref: csiph.com comp.lang.python:79021 On Mon, Oct 13, 2014 at 7:17 AM, Ryan Shuell wrote: > I'm an absolute noob to Python, although I have been programming in several other languages for over 10 years. > > I'm trying to install and run some scripts, and I'm not having much success. > > I followed the steps at this site. > https://docs.python.org/2/install/ > > I have Python 2.7.6 Shell. > > If I type this: > python setup.py install > > I get this: > SyntaxError: invalid syntax Hi! The commands you're looking at need to be run from your regular shell; I'm guessing you may be on Windows, so that would be the command prompt (cmd.exe). But rather than playing with setup.py directly, you should now be able to use pip, which is also run from the command line: C:\>pip install flask C:\>\python27\Scripts\pip install flask The first version works if you've added the appropriate directories to your PATH, the second is where the executable is actually found. I have several Pythons installed, so I didn't let it put itself into PATH; chances are you can take the easy route. ChrisA