How can I install Easy_Install for Python 2.6.4 in Mac OSX 10.4.11【转】

How can I install Easy_Install for Python 2.6.4 in Mac OSX 10.4.11


up vote

1

down vote

favorite


I get the following errors, I've placed [my name] for anonymity:

>>> python /Users/[myname]/Desktop/setuptools-0.6c11/ez_setup.py 

  File "<stdin>", line 1

    python /Users/[myname]/Desktop/setuptools-0.6c11/ez_setup.py 

                                                   ^

SyntaxError: invalid syntax

If you can't see the ^ is under the 11.

Or I get this error:

>>> python /Users/[myname]/Desktop/EZ_tutorial/ez_setup.py 

Traceback (most recent call last):

 File "<stdin>", line 1, in <module>

NameError: name 'python' is not defined

python easy-install

link|improve this question

edited Jan 28 '10 at 5:19


Adam Bernier

13.7k31325

asked Jan 28 '10 at 5:17


Diego

907


92% accept rate



Hi Diego, welcome to SO. When you need a monospace font, you can highlight your text and press ctrl-k. – Adam Bernier Jan 28 '10 at 5:20

2 Answers

active

oldest

votes

up vote

2

down vote

accepted

The ez_setup.py script may or may not work depending on your environment. If not, follow the instructions here. In particular, from the shell, make sure that the python 2.6 you installed is now invoked by the command python:

$ python

Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) 

[GCC 4.0.1 (Apple Inc. build 5493)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> ^D

If not, modify your shell's PATH environment variable. Then download the setuptools 2.6 python egg from here, change to your brower's download directory, and run the downloaded script:

$ cd ~/Downloads # substitute the appropriate directory name

$ sh setuptools-0.6c11-py2.6.egg

link|improve this answer

answered Jan 28 '10 at 8:54


Ned Deily

12.8k11120



I get the following error when trying your first recommendation: >>> sh setuptools-0.6c11-py2.6.egg SyntaxError: invalid syntax that is shown at 0.6c11 the second code you showed returned the following: NameError: name 'cd' is not defined – Diego Jan 29 '10 at 0:28


You are still trying to execute shell commands inside of the Python interpreter! The prompt you see should be something like $ not >>>. Notice the ^D: that means typing the Control and D keys simultaneously and that should return you to the shell. – Ned Deily Jan 29 '10 at 1:20


awesome, it worked. Thanks Ned!! – Diego Jan 29 '10 at 2:45

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值