博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
How can I install Easy_Install for Python 2.6.4 in Mac OSX 10.4.11【转】
阅读量:6334 次
发布时间:2019-06-22

本文共 2229 字,大约阅读时间需要 7 分钟。

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

 

|

edited 

13.7k31325

asked Jan 28 '10 at 5:17

907

92% accept rate

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

2 Answers

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 . 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 , 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

|

answered Jan 28 '10 at 8:54

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 –  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. –  Jan 29 '10 at 1:20

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

欢迎加群互相学习,共同进步。QQ群:iOS: 58099570 | Android: 572064792 | Nodejs:329118122 做人要厚道,转载请注明出处!
本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/sunshine-anycall/archive/2011/07/13/2105768.html
,如需转载请自行联系原作者
你可能感兴趣的文章
eclipse html 打开方式
查看>>
[求助] win7 x64 封装 出现 Administrator.xxxxx 的问题
查看>>
人类投资经理再也无法击败电脑的时代终将到来了...
查看>>
一个最小手势库的实现
查看>>
HoloLens开发手记 - Vuforia开发概述 Vuforia development overview
查看>>
Android支付之支付宝封装类
查看>>
<亲测>CentOS中yum安装ffmpeg
查看>>
【分享】马化腾:产品设计与用户体验
查看>>
【机器学习PAI实践十】深度学习Caffe框架实现图像分类的模型训练
查看>>
全智慧的网络:思科十年来最具颠覆性的创新
查看>>
怎样将现有应用迁移到 VMware NSX
查看>>
赛门铁克收购以色列移动安全初创公司Skycure 旨在构建网络安全防御平台
查看>>
《Photoshop蒙版与合成(第2版)》目录—导读
查看>>
《团队软件过程(修订版)》—第1章1.3节TSPi的设计
查看>>
“最佳人气奖”出炉!4月27号,谁能拿到阿里聚安全算法挑战赛的桂冠?
查看>>
《网页美工设计Photoshop+Flash+Dreamweaver从入门到精通》——2.6 图层与图层样式...
查看>>
《iOS组件与框架——iOS SDK高级特性剖析》——第2章,第2.7节获取线路
查看>>
Spring中 @Autowired标签与 @Resource标签 的区别
查看>>
人工智能凭什么毁灭人类
查看>>
[LeetCode]--349. Intersection of Two Arrays
查看>>