Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106407
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> |
| Newsgroups | comp.lang.python |
| Subject | Re: PyQt4 |
| Date | Sun, 3 Apr 2016 22:32:15 +0200 |
| Lines | 36 |
| Message-ID | <mailman.413.1459715557.28225.python-list@python.org> (permalink) |
| References | <b9ad8b64-b6a9-49df-8085-2d7afd2a406f@googlegroups.com> <mailman.407.1459710890.28225.python-list@python.org> <eba7a2e7-b6d3-404d-a045-9a051e6741d2@googlegroups.com> |
| Reply-To | vincent.vandevyvre@oqapy.eu |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.uni-berlin.de /Fh8gCnqS6SfgIL+YtMH9wXg9zJC3nNtPuqkVTbNf1Xg== |
| Return-Path | <vincent.vande.vyvre@telenet.be> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'ideally': 0.04; 'binary': 0.05; 'error:': 0.05; 'importerror:': 0.05; 'installed.': 0.05; 'suggestions.': 0.09; 'python': 0.10; 'suggest': 0.15; '12:57': 0.16; '2016': 0.16; '21:36,': 0.16; 'from:name:vincent vande vyvre': 0.16; 'michael.': 0.16; 'received:195.130': 0.16; 'received:195.130.137': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'received:telenet-ops.be': 0.16; '\xe9crit': 0.16; 'wrote:': 0.16; 'try:': 0.18; '>>>': 0.20; 'machine': 0.21; 'tried': 0.24; 'import': 0.24; 'header:In-Reply- To:1': 0.24; 'install': 0.25; 'header:User-Agent:1': 0.26; 'example': 0.26; 'installed': 0.26; 'linux': 0.26; 'not.': 0.27; 'specify': 0.27; 'installed,': 0.29; 'matplotlib': 0.29; 'code': 0.30; 'received:be': 0.30; 'michael': 0.33; 'machine.': 0.33; 'file': 0.34; 'except': 0.34; 'skip:d 20': 0.34; 'attempt': 0.35; 'something': 0.35; 'expected': 0.35; 'but': 0.36; 'depends': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'thank': 0.38; 'hi,': 0.38; 'end': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'your': 0.60; 'confirm': 0.62; 'charset:windows-1252': 0.62; 'managers': 0.63; 'header:Reply- To:1': 0.67; 'reply-to:no real name:2**0': 0.71; 'actually,': 0.84; 'utc-7,': 0.84; 'rpm': 0.91; 'technique': 0.93; 'ali': 0.95 |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
| In-Reply-To | <eba7a2e7-b6d3-404d-a045-9a051e6741d2@googlegroups.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:106407 |
Show key headers only | View raw
Le 03/04/2016 21:36, Muhammad Ali a écrit : > On Sunday, April 3, 2016 at 12:15:06 PM UTC-7, Michael Torrie wrote: >> On 04/03/2016 12:57 PM, Muhammad Ali wrote: >>> Hi, >>> >>> How can we confirm that either PyQt4 is already installed on LInux machine or not? >>> >>> Please suggest commands to confirm the already existence of PyQt4 in the machine. >> Ideally you make a distribution-specific package of the binary in a .deb >> on Debian or an RPM on other distros, and specify that it depends on the >> package that provides PyQt4. That way when it's installed, modern >> package managers will automatically install the dependencies. >> >> Alternatively you can use try and except in your python code to attempt >> to import something from PyQt4 and see if it fails or not. This >> technique is also used to make your code work either PyQt4 or PySide, >> depending on which the user has installed. >> >> try: >> from PySide import QtGui >> except ImportError: >> from PyQt4 import QtGui >> >> If neither are installed, this little example will end with an ImportError. > Thank you for your suggestions. I tried both but it shows the following error: > IndentationError: expected an indented block > > Actually, I have to plot some graphs by using matplotlib and PyQt4 at supercomputer. > > Any other suggestion??? There's no IndentationError in the exemple provided by Michael. Copy the code AS IT in a file and retry. Vincent
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
PyQt4 Muhammad Ali <muhammadaliaskari@gmail.com> - 2016-04-03 11:57 -0700
Re: PyQt4 Michael Torrie <torriem@gmail.com> - 2016-04-03 13:14 -0600
Re: PyQt4 Muhammad Ali <muhammadaliaskari@gmail.com> - 2016-04-03 12:36 -0700
Re: PyQt4 Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2016-04-03 22:32 +0200
csiph-web