开发者

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

开发者 https://www.devze.com 2022-12-18 03:39 出处:网络
I get the following errors, I\'ve placed [my name] for anonymity: >>> python /Users/[myname]/Desktop/setuptools-0.6c11/ez_setup.py

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 
                开发者_JAVA百科                                   ^
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


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


Try running that command from a shell (i.e. straight from Terminal.app), not from inside the python interpreter.

0

精彩评论

暂无评论...
验证码 换一张
取 消