ledatelescope / bifrost

A stream processing framework for high-throughput applications.
BSD 3-Clause "New" or "Revised" License
66 stars 29 forks source link

successful install, unsuccessful import on 14.04 machine, CPU only #109

Closed rbw42 closed 2 years ago

rbw42 commented 6 years ago

Hi Folks, Well, you asked for issues, no matter how trivial... I'm trying to use a CPU only version on an ubuntu 14.04 machine. The dependencies (including git version of pyclibrary, which incidentally depends on futures module, it is still true that the pip version is out of date?) all seem to have installed OK and I can import pyclibrary. After make, sudo make install and python setup.py install --user, all seems well. However, when I try to import:

Python 2.7.6 (default, Oct 26 2016, 20:30:19) 
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bifrost
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/rwayth/.local/lib/python2.7/site-packages/bifrost-0.8.0-py2.7.egg/bifrost/__init__.py", line 34, in <module>
    import core, memory, affinity, ring, block, address, udp_socket
  File "/home/rwayth/.local/lib/python2.7/site-packages/bifrost-0.8.0-py2.7.egg/bifrost/core.py", line 29, in <module>
    from libbifrost import _bf
  File "/home/rwayth/.local/lib/python2.7/site-packages/bifrost-0.8.0-py2.7.egg/bifrost/libbifrost.py", line 38, in <module>
    import libbifrost_generated as _bf
  File "/home/rwayth/.local/lib/python2.7/site-packages/bifrost-0.8.0-py2.7.egg/bifrost/libbifrost_generated.py", line 609, in <module>
    _libs["bifrost"] = load_library("bifrost")
  File "/home/rwayth/.local/lib/python2.7/site-packages/bifrost-0.8.0-py2.7.egg/bifrost/libbifrost_generated.py", line 369, in load_library
    raise ImportError("%s not found." % libname)
ImportError: bifrost not found.

Any hints? Thanks, Randall

MilesCranmer commented 6 years ago

Hi Randall,

Do you know where libbifrost.so was installed? You can try find / -name libbifrost.so 2>/dev/null to find it. Make sure the folder holding it is in your LD_LIBRARY_PATH environment variable. (i.e., try echo $LD_LIBRARY_PATH to see what folders you are searching through.) Once you find it, append it like export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib (where in this case, /usr/local/lib is the folder with that file).

By the way, pyclibrary was replaced with ctypesgen - is there a document somewhere that says to use pyclibrary? It will be useful to know if something is out of date.

Cheers, Miles

rbw42 commented 6 years ago

Hi Miles,

Thanks for this. The reference to pyclibrary is on the wiki getting started guide on the github page. Last edited Aug 2016. Should I wipe this installation and start again?

The .so file was installed in /usr/local/lib. I've never had to specify a LD_LIBRARY_PATH for the system to find stuff in /usr/local/lib before, but in this case your suggestion worked and it seems to be necessary. (This is a little scary - I did actually do a sudo ldconfig to ensure the runtime dynamic linker knew about this file, the default settings in ubuntu include this directory to search. But apparently python has its own dynamic linker? Scary.)

On to the next hurdle. Thanks again.

Randall.

On 15 November 2017 at 07:00, Miles Cranmer notifications@github.com wrote:

Hi Randall,

Do you know where libbifrost.so was installed? You can try find / -name libbifrost.so 2>/dev/null to find it. Make sure the folder holding it is in your LD_LIBRARY_PATH environment variable. (i.e., try echo $LD_LIBRARY_PATH to see what folders you are searching through.) Once you find it, append it like export LD_LIBRARY_PATH=$LDLIBRARY PATH:/usr/local/lib (where in this case, /usr/local/lib is the folder with that file).

By the way, pyclibrary was replaced with ctypesgen - is there a document somewhere that says to use pyclibrary? It will be useful to know if something is out of date.

Cheers, Miles

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ledatelescope/bifrost/issues/109#issuecomment-344429020, or mute the thread https://github.com/notifications/unsubscribe-auth/AGpGKt1rf_k5JOhH0WzkuvgVBSwA1RdZks5s2huTgaJpZM4QdY5a .

telegraphic commented 6 years ago

@rbw42 I wonder if you ended up on my local branch (https://telegraphic.github.io/bifrost/Getting-started-guide.html) instead of the official branch (http://ledatelescope.github.io/bifrost/Getting-started-guide.html). I should probably just delete my branch to avoid this!

telegraphic commented 6 years ago

Ok, my fork is archived and docs removed.

rbw42 commented 6 years ago

No, looking at: https://github.com/ledatelescope/bifrost

then click on the wiki tab near the top

On 15 November 2017 at 10:18, Danny Price notifications@github.com wrote:

@rbw42 https://github.com/rbw42 I wonder if you ended up on my local branch (https://telegraphic.github.io/bifrost/Getting-started-guide.html) instead of the official branch (http://ledatelescope.github. io/bifrost/Getting-started-guide.html). I should probably just delete my branch to avoid this!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ledatelescope/bifrost/issues/109#issuecomment-344464661, or mute the thread https://github.com/notifications/unsubscribe-auth/AGpGKs-v7CMvFkNNLjEMns6V-jn51_y6ks5s2knZgaJpZM4QdY5a .

telegraphic commented 6 years ago

Ah ok, yes that is indeed out of date. I vote we stick to the github.io docs and remove the wiki...

rbw42 commented 6 years ago

sounds good. For the record, that means the instructions in the README are also out of date.

On 15 November 2017 at 11:13, Danny Price notifications@github.com wrote:

Ah ok, yes that is indeed out of date. I vote we stick to the github.io docs and remove the wiki...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ledatelescope/bifrost/issues/109#issuecomment-344473063, or mute the thread https://github.com/notifications/unsubscribe-auth/AGpGKrbaPv3ayFQfJeHrjPKDi2eBAcYsks5s2lbIgaJpZM4QdY5a .

jaycedowell commented 2 years ago

Closing with the release of v0.10.0.