On 4 May 2018 at 20:37, John Spray <jspray@xxxxxxxxxx> wrote: > On Fri, May 4, 2018 at 4:00 PM, Rishabh Dave <ridave@xxxxxxxxxx> wrote: >> On 2 May 2018 at 22:36, Patrick Donnelly <pdonnell@xxxxxxxxxx> wrote: >>> >>> It's not necessary but it shouldn't be much more work*. I'd recommend >>> updating vstart_runner.py too. >>> >>> * You should be able to run the Python payloads in >>> test_volume_client.py manually. >> >> I am trying to run the payloads manually by copying it (and the >> standard header and footers) in a file[1] for convenience in >> src/pybind/ so that ceph_volume_client.py and rest of modules are >> available immediately. However, on running the test, I get the >> following error - >> >> Traceback (most recent call last): >> File "test.py", line 1, in <module> >> from ceph_volume_client import CephFSVolumeClient, VolumePath >> File "/home/centos/repos/ceph/src/pybind/test/ceph_volume_client.py", >> line 22, in <module> >> import cephfs >> ImportError: No module named 'cephfs' >> >> After the adding >> "/home/centos/repos/ceph/build/lib/cython_modules/lib.3/" to >> PYTHONPATH env. variable, I get a similar error message - >> >> Traceback (most recent call last): >> File "test.py", line 1, in <module> >> from ceph_volume_client import CephFSVolumeClient, VolumePath >> File "/home/centos/repos/ceph/src/pybind/test/ceph_volume_client.py", >> line 22, in <module> >> import cephfs >> ImportError: libcephfs.so.2: cannot open shared object file: No such >> file or directory >> >> libcephfs.so.2 resides in ceph/build/lib/libcephfs.so.2 but updating >> PYTHONPATH has no impact. How do I proceed? > > Because the python libraries are importing the equivalent C libraries, > you also need to update LD_LIBRARY_PATH > > My (python 2) prefix looks like this: > LD_LIBRARY_PATH=~/ceph/build/lib/ > PYTHONPATH=~/ceph/build/lib/cython_modules/lib.2/ Occasionally, despite of exporting the above environment variables with right values I see the following error - $ python3 Python 3.4.5 (default, Dec 11 2017, 14:22:24) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ceph_volume_client Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/centos/repos/ceph/src/pybind/ceph_volume_client.py", line 22, in <module> import cephfs ImportError: dynamic module does not define init function (PyInit_cephfs) I have tried `$ git clean -f` to get rid of cephfs.c generated using cephfs.pyx (and other .c files generated from .pyx), but it has been no good. What has worked last 2 times is (which obviously is incorrect) to reboot the instance and run make so that is build cephfs module again. Any ideas about what has been going wrong? I have copied make's output and the environment variable's values here - https://paste.fedoraproject.org/paste/J7d61XOvQNMGN2dacvbqqg. -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html