Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106396
| X-Received | by 10.140.101.133 with SMTP id u5mr6527217qge.12.1459712186090; Sun, 03 Apr 2016 12:36:26 -0700 (PDT) |
|---|---|
| X-Received | by 10.50.18.42 with SMTP id t10mr126984igd.6.1459712186050; Sun, 03 Apr 2016 12:36:26 -0700 (PDT) |
| Path | csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!10no210647qgg.1!news-out.google.com!ha2ni527igb.0!nntp.google.com!gy3no23097igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Sun, 3 Apr 2016 12:36:25 -0700 (PDT) |
| In-Reply-To | <mailman.407.1459710890.28225.python-list@python.org> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=2607:5300:60:3f5b:0:0:0:0; posting-account=jEDbSQoAAAD46faTChTh4OvpDlO9keJn |
| NNTP-Posting-Host | 2607:5300:60:3f5b:0:0:0:0 |
| References | <b9ad8b64-b6a9-49df-8085-2d7afd2a406f@googlegroups.com> <mailman.407.1459710890.28225.python-list@python.org> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <eba7a2e7-b6d3-404d-a045-9a051e6741d2@googlegroups.com> (permalink) |
| Subject | Re: PyQt4 |
| From | Muhammad Ali <muhammadaliaskari@gmail.com> |
| Injection-Date | Sun, 03 Apr 2016 19:36:26 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Lines | 31 |
| X-Received-Bytes | 2542 |
| X-Received-Body-CRC | 800041151 |
| Xref | csiph.com comp.lang.python:106396 |
Show key headers only | View raw
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???
Back to comp.lang.python | Previous | Next — Previous in thread | Next 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