-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make pyzmq pip-installable without libzmq present #128
Comments
Minrk-- I am, once again, fighting my way through installing pyzmq onto a linux (centos) box. I had to refer back to an issue I raised two months ago and try to reconstruct the process that eventually led to a successful installation. But perhaps you could explain why it's so difficult in the first place to install the python zmq binding onto a linux box. I would have thought a simple sudo easy_install pyzmq would do it, and I'm surprised that it doesn't work. Are you guys all using windows machines, or am I doing something stupid, or what? Thanks! --eric |
ha, no, we don't use Windows on purpose ever. |
Glad to hear you're not using windows. I've had to build pyzmq from source on both my Unbuntu and Centos machines. Both of them are 64-bit ... would that make a difference? |
Using Debian on 32 and 64 bit architectures and installing pyzmq inside and outside of virtualenv. No problems so far. Given the enormous amount of information available I'd say it's not a pyzmq issue and not an issue on most Linux distros. But I've seen problems w/ Centos a lot on IRC. Most of the problems were related to the ancient python version used. Cheers |
Does Python 2.6.6 count as ancient? |
No, 2.6.6 is not ancient, and my most often used system is Ubuntu 10.04 LTS with 2.6.5. The following script works to build&install zeromq and pyzmq in this environment: wget http://download.zeromq.org/zeromq-2.1.11.tar.gz
tar -xzf zeromq-2.1.11.tar.gz
cd zeromq-2.1.11
./configure && make && sudo make install
sudo ldconfig
sudo easy_install pyzmq If you have some constructive information about what errors you actually face, and what needs to be fixed to build reliably on CentOS would be much appreciated. |
I don't know if this is constructive information, but I just spent a bunch of time making sure I could reliably replicate the problem. I can replicate this any time I want to by activating a virtualenv and then trying to run either easy_install or building from source. So, if I try to use easy_install I get the same error as when I do:
namely:
If I do this:
then it works. And once it works, I can just do:
which will then start working. |
What if you run ldconfig prior to configuring libzmq? |
Do you mean "run ldconfig prior to configuring pyzmq"? I've tried it many many times! It still doesn't work. I have to go:
|
Do you have to use a virtualenv in order to cause this to fail? If so, then virtualenv is probably patching the link path, to explicitly prevent searching /usr/local by default. If that's the case, then presumably the 'right way' would seem to be to install libzmq into the virtualenv. |
The error occurs regardless of whether or not I use virtualenv |
I created a completely fresh Centos 6.1 install in a virtual machine. Here are the commands I gave.
The --zmq=/usr/local is required in order to get the
command to work. |
That suggests to me that CentOS doesn't include /usr/local/lib in the link path by default. Is this true? If so, I can make the default behavior on centos be to use /usr/local instead of trusting the linker. The reason I don't do this in general is that if users have their env configured such that the linker will find libzmq without being specified a path (not uncommon), defaulting to /usr/local will fail. What do you get trying to compile a trivial c program with |
Actually, what I will try to do first is to see if I can't fall back on /usr/local if the first check fails. That should cover both cases. |
I just setup a CentOS 6.2 VM, and see exactly what you do. It appears that on CentOS /usr/local/lib is not on the default LD path, so files linked there will not be found unless you add |
Cool. BTW, I just had to test it in Ubuntu 11.10 and after I've built zmq, easy_install pyzmq works fine. |
@ejb11235 PR #184 introduces a fallback to /usr/local if the first build fails, which makes easy_install work for me without having to specify that libzmq is in /usr/local. It still seems extraordinarily stupid that CentOS has made this choice (their LD config is internally inconsistent, because the linker and runtime library paths are not the same). |
pyzmq-static is installable via pip or easy_install, even in the absence of libzmq, because it builds libzmq as a Python extension. pyzmq should do the same thing, with a few small changes:
configure && make
, etc.), rather than as a Python extension*.*Possibly, but not necessarily [3]. The Python extension route would be much easier.
The text was updated successfully, but these errors were encountered: