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

你可能感兴趣的:(easy_install)