2012-01-30 13 views
5

पर पायथन 3 setuptools मैंने अपने मैक पर पायथन 3.2 स्थापित किया है, और मैं setuptool के easy_install का उपयोग करके कुछ संकुल स्थापित करना चाहता हूं।मैक

ओह, है easy_install मैं (का उपयोग करते हुए आदेश-पंक्ति स्वत: पूर्ण) कर रहे हैं केवल संस्करण:

easy_install  easy_install-2.5 easy_install-2.6 

मैं कैसे पायथन 3.2 के लिए संकुल स्थापित कर सकते हैं?

परिशिष्ट

मैं Thomas K की सलाह का पालन किया है:

$ curl -O http://python-distribute.org/distribute_setup.py 
$ python distribute_setup.py 

लेकिन कोई किस्मत, easy_install अभी भी Python 2.6 संकुल स्थापित करता है:

$ easy_install beautifulsoup 
Searching for beautifulsoup 
Best match: BeautifulSoup 3.2.0 
Processing BeautifulSoup-3.2.0-py2.6.egg 

मैं कैसे करने के लिए easy_install मजबूर करते हैं इसके बजाय Python 3.2 पैकेज पुनर्प्राप्त करें?

उत्तर

5

आप setuptools स्थापित करने की जरूरत है - या बल्कि, कांटा तथाकथित 'वितरित', मूल setuptools के बाद से अजगर का समर्थन नहीं करता 3.

वहाँ निर्देश यहां हैं: http://pypi.python.org/pypi/distribute#installation-instructions

+0

मैं निर्देशों का पालन किया: easy_install के python3 संस्करण को चलाने के लिए, आपको/usr/स्थानीय/बिन में जड़

/Library/Frameworks/Python.framework/Versions/3.3/bin/easy_install 

के रूप में निम्न का उपयोग कर या यह करने के लिए एक प्रतीकात्मक कड़ी जगह की जरूरत है (परिशिष्ट देखें), लेकिन वितरण मेरे पायथन 2.6 पर स्थापित किया गया था। –

+1

@AdamMatan: फिर आप Python 2.6 के साथ स्थापित चलाया। यह आपके द्वारा स्थापित चलाने के लिए उपयोग किए जाने वाले अजगर में स्थापित होता है। बहुत आसान और स्पष्ट। –

4

तो जैसा:

$ curl -O http://python-distribute.org/distribute_setup.py 
$ python3.2 distribute_setup.py 
     ^^^ 

या भी:

$ curl -O http://python-distribute.org/distribute_setup.py 
$ /the/path/to/the/python/where/you/want/it/installed/bin/python distribute_setup.py 
0

अन्य निर्देशों का पालन करने के बाद:

curl -O http://python-distribute.org/distribute_setup.py 
python3.2 distribute_setup.py 

आप आधिकारिक python3 पैकेज का उपयोग किया है, जब आप distribute_setup.py स्थापित करते हैं, यह python3 स्थानों आसान फाइल सिस्टम के/Library/Frameworks भाग में स्क्रिप्ट स्थापित करें।

sudo ln -s /Library/Frameworks/Python.framework/Versions/3.3/bin/easy_install-3.3 /usr/local/bin/