delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/30/17:24:26

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=4.6 required=5.0 tests=AWL,BAYES_20,BOTNET,J_CHICKENPOX_12,SPF_SOFTFAIL
X-Spam-Check-By: sourceware.org
Date: Fri, 30 Jan 2009 17:24:27 -0500
From: Jason Tishler <jason AT tishler DOT net>
To: cygwin AT cygwin DOT com
Subject: Re: The error of *import socket* within python.
Message-id: <20090130222427.GE11828@tishler.net>
Mail-followup-to: cygwin AT cygwin DOT com
References: <ldb6o45u63o5v8nagks089q8d0ir1hp4sm AT 4ax DOT com>
MIME-version: 1.0
In-reply-to: <ldb6o45u63o5v8nagks089q8d0ir1hp4sm@4ax.com>
User-Agent: Mutt/1.4.2.1i
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Sat, Jan 31, 2009 at 12:43:13AM +0800, Hongyi Zhao wrote:
> I've installed the Python 2.5.2 using the setup.exe, then I run the
> folloiwng commands and meet errors:
> 
> $ python
> 'import site' failed; use -v for traceback
> Python 2.5.2 (r252:60911, Dec  2 2008, 09:26:14)
> [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import socket
>   File "<stdin>", line 1
>     import socket
>     ^
> SyntaxError: invalid syntax
> >>>
> 
> Could you please give me some hints?

Was the installation successful?  Sounds like you are missing some
files.  What does the following indicate?

    $ cygcheck -c python

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019