2010-04-06 20 views
10

पर पीईक्यूटी कैसे स्थापित करें मैक ओएस एक्स पर काफी नया हूं जब मैंने पाइथन 3.1, क्यूटी 4.6.2 और एसआईपी 4.10.1 स्थापित करने के बाद मैक ओएस एक्स पर पीईक्यूटी स्थापित करने का प्रयास किया। त्रुटि के बाद जब मैं $ python3 config.py कमांड निष्पादित करता हूं।मैक ओएस एक्स 10.6

Determining the layout of your Qt installation... 
This is the GPL version of PyQt 4.7 (licensed under the GNU General Public 
License) for Python 3.1 on darwin. 

Type '2' to view the GPL v2 license. 
Type '3' to view the GPL v3 license. 
Type 'yes' to accept the terms of the license. 
Type 'no' to decline the terms of the license. 

Do you accept the terms of the license? yes 
Checking to see if the QtGui module should be built... 
Checking to see if the QtHelp module should be built... 
Checking to see if the QtMultimedia module should be built... 
Checking to see if the QtNetwork module should be built... 
Checking to see if the QtOpenGL module should be built... 
Checking to see if the QtScript module should be built... 
Checking to see if the QtScriptTools module should be built... 
Checking to see if the QtSql module should be built... 
Checking to see if the QtSvg module should be built... 
Checking to see if the QtTest module should be built... 
Checking to see if the QtWebKit module should be built... 
Checking to see if the QtXml module should be built... 
Checking to see if the QtXmlPatterns module should be built... 
Checking to see if the phonon module should be built... 
Checking to see if the QtAssistant module should be built... 
Checking to see if the QtDesigner module should be built... 
Qt v4.6.2 free edition is being used. 
Qt is built as a framework. 
SIP 4.10.1 is being used. 
The Qt header files are in /usr/include. 
The shared Qt libraries are in /Library/Frameworks. 
The Qt binaries are in /Developer/Tools/Qt. 
The Qt mkspecs directory is in /usr/local/Qt4.6. 
These PyQt modules will be built: QtCore. 
The PyQt Python package will be installed in 
/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages. 
PyQt is being built with generated docstrings. 
PyQt is being built with 'protected' redefined as 'public'. 
The Designer plugin will be installed in 
/Developer/Applications/Qt/plugins/designer. 
The PyQt .sip files will be installed in 
/Library/Frameworks/Python.framework/Versions/3.1/share/sip/PyQt4. 
pyuic4, pyrcc4 and pylupdate4 will be installed in 
/Library/Frameworks/Python.framework/Versions/3.1/bin. 
Generating the C++ source for the QtCore module... 
sip: Usage: sip [-h] [-V] [-a file] [-b file] [-c dir] [-d file] [-e] [-g] [-I dir] [-j #] [-k] [-m file] [-o] [-p module] [-r] [-s suffix] [-t tag] [-w] [-x feature] [-z file] [file] 
Error: Unable to create the C++ code. 

किसी ने यहां मैक ओएस एक्स 10.6.2 पर सफलतापूर्वक PyQt स्थापित किया है?

उत्तर

6

मुझे आपके जैसा ही समस्या थी। समाधान अपेक्षाकृत सरल है।

PyQt4 के config.py में एक बग के कारण, आपके पास अपने PyQt4 स्रोत निर्देशिका पथ में कोई स्पेस कैरेक्टर नहीं होना चाहिए। त्रुटि गलत वाक्यविन्यास के कारण होती है जब config.py रिक्त स्थान के साथ इनपुट पथ पर निष्पादन योग्य एसआईपी को आमंत्रित करता है।

+1

आप इसे कैसे हल करते हैं? –

+0

सरल, डेस्कटॉप पर पीईक्यूटी 4 स्रोत फाइल फ़ोल्डर (जिसे पीईक्यूटी-मैक-जीपीएल-4.xx.एक्स जैसे कुछ कहा जाता है) कॉपी करें और पुनः प्रयास करें। –

8

क्यूटी और PyQT भी Homebrew

+0

मैं पाइप और easy_install के माध्यम से स्थापित करने की कोशिश करता रहा, लेकिन उन दोनों पैकेजों में समस्याएं स्थापित हैं। आपने मुझे सेगमेंटेशन दोषों और निर्भरताओं को समझने से बचाया है – pocketfullofcheese

0

का उपयोग कर जब से तुम PyQt v4.7 आप भी Qt v4.7 स्थापित करते हैं, आगे जाना है और पहले Qt v4.7.1 स्थापित करने की आवश्यकता का उपयोग कर रहे पर OSX स्थापित करने के लिए उपलब्ध है।

+0

नहीं, ऐसा नहीं है – AbiusX

4

मुझे यह समस्या थी, और वास्तव में मेरा पीईक्यूटी स्रोत फ़ोल्डर एक निर्देशिका में था जिसमें पथ में कहीं जगह अंतरिक्ष चरित्र था।

मैं पीईक्यूटी स्रोत फ़ोल्डर को रूट पर ले जाकर और वहां से पायथन कॉन्फ़िगरेशन चलाकर यह काम करने में सक्षम था।

1

आप PyQtX का भी उपयोग कर सकते हैं, जो ओएस एक्स के लिए पीईक्यूटी का बाइनरी वितरण है और इसमें क्यूटी पुस्तकालय भी शामिल हैं। आपको बस इसके लिए पाइथन चाहिए।

+1

यह ओएस एक्स 10.8 के साथ काम नहीं करता है, आधिकारिक वितरण से पायथन 2.7 नहीं होने के बारे में शिकायत कर रहा है। यह हास्यास्पद है कि रेफैक्टो पायथन वह है जो ओएस के साथ आता है। – sorin

+0

यदि आप स्थापना से पहले आवश्यकताओं को पढ़ते हैं, तो यह स्पष्ट रूप से बताता है कि आपको Python.org वितरण से पायथन स्थापित करने की आवश्यकता है, न कि मैक ओएस एक्स – AbiusX

+1

के साथ आता है यह सही जवाब होना चाहिए, यह सबसे आसान समाधान है आप अजगर के एक ब्रू संस्करण का उपयोग नहीं करते हैं। – Jim

32

काढ़ा उपयोग करके देखें:

brew install pyqt 

यह अधिक उच्च अब macports से सिफारिश की है।

+3

चेतावनी! यह केवल तभी काम करता है जब आप ब्रू से पायथन का उपयोग कर रहे हों और ओएस एक्स के साथ वितरित नहीं किया गया हो। तो यदि पीएटीएच में पहला पायथन ओएस एक्स है, तो यह काम नहीं करेगा। – sorin

+1

... लेकिन आप अपने 'पायथनपथ' में पीईक्यूटी का मार्ग जोड़ सकते हैं। वास्तव में, होमब्रू आपको उस पथ को देगा जो आपको निर्यात करने की आवश्यकता होगी, 'निर्यात PYTHONPATH =/usr/local/lib/python2.7/साइट-पैकेज: $ PYTHONPATH' के साथ कुछ। इसे अपने '~/.bashrc' फ़ाइल में रखें और आपको जाने के लिए अच्छा होना चाहिए। –

संबंधित मुद्दे