ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » Python pywmq

Post new topic  Reply to topic Goto page 1, 2  Next
 Python pywmq « View previous topic :: View next topic » 
Author Message
zpat
PostPosted: Fri Mar 25, 2011 6:36 am    Post subject: Python pywmq Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

See announcement http://www.mqseries.net/phpBB2/viewtopic.php?p=300219#300219

Hi, can you please provide download links to pre-compiled versions of PyMQI and indeed Python itself for the popular WMQ v7 client platforms (Windows 32, AIX, Linux)? It's a shame to have an easy to use language but with a hard to install distribution format!

This would allow those of us without access or familarity with compiling and building these sorts of packages to immediately start using what looks to be a very useful tool for developing interpreted MQI scripts. Thanks.
Back to top
View user's profile Send private message
dsuch
PostPosted: Fri Mar 25, 2011 7:18 am    Post subject: Reply with quote

Novice

Joined: 02 May 2006
Posts: 14

Many thanks for your interest zpat!

As for Python itself, Windows binaries are at the project's site http://python.org/download/releases/. In addition to that, each Linux distribution ships with Python as well and you should simply use the given distribution's tools for installing it - I mean using yum, apt or similar tools. I'm not an AIX user but I can see there are Python binaries for that system at http://python.org/download/other/

PyMQI - like I mentioned at my blog http://j.mp/i4GBr3 - I just had to assume some level of familiarity of the Python tools, and that all stems from the fact that PyMQI has up until very recently been mostly used by people who were Python programmers and they knew very well their way around such things as "easy_install" or "pip" (both installers for Python software). Now that the project is gaining the momentum, I can clearly see a need for better instructions, the installation docs should obviously be expanded and I can only be thankful for your brining the subject to my attention! I think a nice set of RPMs and DEBs for Linux should nicely do the trick, don't you think? In addition to that, each PyMQI release comes with Windows binaries, for instance, PyMQI 1.2 offers about 20 binaries for various MQ/Python/Windows versions at https://launchpad.net/pymqi/+download

AIX - like I said, I'm not an AIX user and I don't even have access to any AIX system. If you think you can contribute it to the project - I mean some SSH/VPN connection to a development partition - then I'm 100% sure we can work out any details. That's not so a crazy idea as it may seem, there are PyMQI users who contributed access to a Solaris SPARC so such things happen. It even just so happens that I've asked several companies using PyMQI if they were able to do it with AIX yet the answer was always negative due to various internal policies - that's why I'm still waiting for someone to make the first move, so to speak

Thanks again and don't hesitate to contact me should you any, and I mean absolutely any, suggestions, complaints or just about anything.

Cheers!
Back to top
View user's profile Send private message Visit poster's website
zpat
PostPosted: Fri Mar 25, 2011 11:23 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

If you could build the binaries for Linux as well as for Windows that would certainly help. However I don't have root access to our Linux 86X64 (RHEL) hosts and would prefer something that didn't need root to install it, as well as the RPM.

I think there are two things you could do to make it more accessible to the wider community - (1) build more binaries and I suspect IBM would be the best people to help with getting access to AIX and (2) providing a dummies guide to the build process (assuming no prior knowledge and no existing software installed and no root access).

If you provided a step by step guide to the whole Python and pyMQI build on Linux that I could also run on AIX 5.3, then I could maybe upload the resulting binaries to you - but for me to follow a Unix guide - it has to be really simple and as scripted as possible.

Others may be rather more skilled like the many Matts (or Jeffs) on here

Releasing this as a ready to run IBM support pac would be even better and IBM generally welcome such third-party contributions (I am not from IBM though).

Are Python versions very specific? Because there seems to be pyMQI builds for each one. Also I see Python binaries for AIX 6, not AIX 5.3. It would be a shame if there are tight version dependences between the OS versions, Python and pyMQI versions.
Back to top
View user's profile Send private message
dsuch
PostPosted: Fri Mar 25, 2011 2:32 pm    Post subject: Reply with quote

Novice

Joined: 02 May 2006
Posts: 14

I've opened two bug reports at the project's issue tracker http://pad.lv/742783 and http://pad.lv/742786. You can subscribe there or I can let you know when there's any progress by private e-mail, whatever's easier for you. Many thanks for your offer, greatly appreciated!

Quote:
If you could build the binaries for Linux as well as for Windows that would certainly help.


Like I said, Windows binaries are on the main download page https://launchpad.net/pymqi/+download.

Quote:
Are Python versions very specific? Because there seems to be pyMQI builds for each one.


That's actually because of how MQ, Python and Windows work. For MQ, PyMQI is a shared library and it must be linked against a concrete MQ version. Python 32-bit vs. 64-bit is another factor. Next, there's a client mode vs. bindings one. And the last thing, *binary/compiled* Python extension modules are not guaranteed to be backwards-compatible. Hence, if you multiply the number of MQ versions by 32-bit/64-bit by connection mode by various Python versions, you end up with 20-odd installers for Windows. It's worth noting though that they're there merely for the people's convenience - I wouldn't have been doing it had C compilers been a commodity on Windows. Obviously they aren't so I compiled it all myself. If you have a C compiler on Windows you can still easily compile PyMQI yourself. And Python itself is actually very conservative when in comes to break backward-compatibility, probably the only major exception being the difference between 2.x and 3.x lines.

I hope the forum admins won't step in at my lengthy response, but in short, with Python there's really no such thing as a "binary release of a package" in the sense of one giant blob which contains all the dependencies. Thankfully - and quite unlike Java for instance - each Python's installation has a well-known place for installing software, for instance, on the system I'm writing it from - Ubuntu Linux 10.10 - it's /usr/lib/python2.6/dist-packages, and I know that the packages I install go there instead of being strewn all over the system. So, the "binary" RPM or DEB is actually a wrapper that installs stuff into the given system's well-established place for Python things. I don't know, maybe saying it's like a difference between a shared library and a static one would be better?

Another set of tools are things like pip [1]. It's an installer written specifically for Python packages. You install pip, then you issue a single command "pip install pymqi" and it will connect to PyPI [2], download the latest PyMQI version, its Python dependencies if needed, compile it for you, and install into an appropriate place. Of course, your dev/admin people can also have their local/intranet PyPI instances, you don't have to connect to the Internet all the time. pip is pure Python and I'd be surprised to hear it it didn't work on AIX.

You mentioned you didn't have root access. That's also OK because in addition to installing stuff to the central repo at, say, /usr/lib/python2.6/dist-packages, one can always install Python packages into custom locations, into /home/me/py-stuff etc.

It's all Python-specific, and it doesn't even cover 1% of the options for installing Python apps yet I don't know if it doesn't go against the grain to discuss it all here, in the News/Updates forum - I'm sorry if it's noise to anyone!

Quote:
Also I see Python binaries for AIX 6, not AIX 5.3. It would be a shame if there are tight version dependences between the OS versions, Python and pyMQI versions.


I can't really speak for there not being Python for AIX 5.3 but I can imagine the guy behind the 6.0 version [3] would be happy to help you with creating/compiling Python for 5.3. Who knows, maybe you could then together provide a Python binary release for AIX 5.3 (that would be terrific!)

And I agree tight dependencies are a shame, but it has not much really to do with PyMQI as such. In the source code form, it can be compiled on just about any system with a C compiler. Actually, as far as the major systems go, the only ones that it hasn't been tried on are z/OS and friends, not including z/Linux of course which PyMQI runs atop of just fine.

I haven't ever thought of PyMQI's becoming a SupportPac. I have no idea what sort of process it involves, but who knows, maybe it's something IBM would approve of some day? Heh, is there any SupportPac that at the same time is an open source project? That would be something interesting. And it would certainly depend on the number of PyMQI users so I hope everything's going to be fine for you with installing and using PyMQI on AIX - people are doing it, so why shouldn't it work this time?

Cheers!

[1] http://www.pip-installer.org/en/latest/
[2] http://pypi.python.org/pypi
[3] https://spreitzer.name/
Back to top
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Sat Mar 26, 2011 7:36 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It's certainly good discussion.

A moderator may choose to split it out and move it to General Discussion.

Don't take that as a censure.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Mar 26, 2011 12:15 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

mqjeff wrote:
It's certainly good discussion.

A moderator may choose to split it out and move it to General Discussion.

Don't take that as a censure.

Done
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
zpat
PostPosted: Sun Mar 27, 2011 12:18 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

In terms of making this available as a support pac

http://www-01.ibm.com/support/docview.wss?uid=swg27007205

Use feedback form on that page

Quote:
Related Links: Questions regarding WebSphere MQ SupportPacs
If you wish to contact the WebSphere MQ SupportPac Administrator with a specific SupportPac query or a third party submission, scroll down to the 'Rate this page' section and use the comments box. Please ensure that you include your email address if a reply is required.
Back to top
View user's profile Send private message
colbype
PostPosted: Sat Apr 16, 2011 7:58 pm    Post subject: Iseries Reply with quote

Novice

Joined: 13 Jan 2009
Posts: 23

dsuch,

Has anyone tried to install this on an Iseries?

This is a great discussion that I will follow as I have been playing around with it recently. Also, I didn't see an installer for Python 3. Is that something that can be done?
Back to top
View user's profile Send private message
dsuch
PostPosted: Wed Apr 27, 2011 3:37 am    Post subject: Re: Iseries Reply with quote

Novice

Joined: 02 May 2006
Posts: 14

Hi colbyte,

I'm terribly sorry but it seems I haven't received a notification regarding your post - I was subscribed to the original announcement but apparently the subscription didn't follow to the new topic. I'm sorry again!

colbype wrote:

Has anyone tried to install this on an Iseries?


I know some people have been using it on AS/400 - I'm assuming the platform's conservative enough for PyMQI to be able to run on System I, as I can see it's dubbed nowadays - personally I can only speak for whatever I have direct access to but frankly I see absolutely no reason for any issues, it's Python + C so you'll be all good as long as you have Python and a C compiler

colbype wrote:

Also, I didn't see an installer for Python 3. Is that something that can be done?


I haven't tried it on Python 3 but there's a long standing bug report of mine about it http://pad.lv/449733 - if you can help with it in any way, for instance by trying to run it on Python 3 and reporting any problems you encounter, that'd be terrific!
Back to top
View user's profile Send private message Visit poster's website
colbype
PostPosted: Wed Apr 27, 2011 4:18 am    Post subject: Reply with quote

Novice

Joined: 13 Jan 2009
Posts: 23

Thanks for the reply, when I get more time I will work on testing it out. With Python on the Iseries, I was not sure if they are just compiling python in the IFS, as if it was a Unix system, or if it was with python that this group is working on for the Iseries, which adds more native type functions for it.

http://www.iseriespython.com

Soon as I am able to tests some of these concepts out, I will share my results with you. I am still very new to python in general, so it will take some time.
Back to top
View user's profile Send private message
dsuch
PostPosted: Wed Apr 27, 2011 4:38 am    Post subject: Reply with quote

Novice

Joined: 02 May 2006
Posts: 14

Sure thing colbyte! I'll be happy to help you out with anything PyMQI or Python related but iSeries isn't really something I'm familiar with. If IFS is something akin to z/Linux then yea, that's not what I meant, rather that I didn't see any reason for there be problems with compiling PyMQI natively on any system with a C compiler. The only trouble is that I don't know that particular system
Back to top
View user's profile Send private message Visit poster's website
bobbee
PostPosted: Thu Jun 30, 2022 4:35 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

I understand this is an old thread.

AIX 7.1, Python3, PYMQI 1.12.8

I have a customer who CANNOT build the PYMQI module. I created an provisioned an AIX server and built what I need. I was able to do:

1 - python3 ./setup.py build
2 - python3 ./setup.py install

I moved the build contents over to the customer and tried the 'install' It was still failing, looking for the XL C compiler. Which is not there and cannot be installed.

With what I have on my provisioned AIX box, what do I move and how do I get it installed to have PYMQI installed on my customers AIX box. Their entire environment is shielded, thus the need for a local install.
Back to top
View user's profile Send private message Send e-mail AIM Address
markt
PostPosted: Thu Jun 30, 2022 6:10 am    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 502

The only piece of compiled code you should need would be the pymqe.so library. On my system, it's put the entire package - both compiled and not - under this directory:

Code:
$HOME/.local/lib/python3.7/site-packages/pymqi


Whether you need to just copy over the shared lib, or that whole tree, and where it actually goes, is going to depend on how you've got the python system set up on the target machine - local vs global packages for example. Certainly the whole tree is needed somewhere.
Back to top
View user's profile Send private message
bobbee
PostPosted: Thu Jun 30, 2022 10:13 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

Thanks, I was told it was a local install of PYTHON but I am having them ask the ADMIN who did the install.
Back to top
View user's profile Send private message Send e-mail AIM Address
bobbee
PostPosted: Fri Jul 08, 2022 7:02 am    Post subject: Reply with quote

Knight

Joined: 20 Sep 2001
Posts: 541
Location: Tampa

Thanks for that info. I extracted the pymqi package from my working AIX box to my clients AIX box into the same place. I trying to run my script and it sez NOT FOUND on the 'import pymqi' statement in the script. Not sure why it cannot find the package.

Code:
mqm@devxxxxxxx:/home/mqm>$pwd
/opt/lib/python3.8/site-packages/pymqi-1.12.8-py3.9-aix-705-2135-32-egg
mqm@devxxxxxxx:/home/mqm>$ls
EGG-INFO [pymqi
mqm@devxxxxxxx:/home/mqm>$cd pymqi
mqm@devxxxxxxx:/home/mqm>$ls
CMQC.py    CMQCFC.py   CMQXC.py   CMQZC.py   __init__.py  __pycache__ const.py   pymqe.py  pymqe.so
mqm@devxxxxxxx:/home/mqm>$
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General Discussion » Python pywmq
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.