Skip to content
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

update install documentation #1484

Merged
merged 1 commit into from
Sep 15, 2023
Merged

update install documentation #1484

merged 1 commit into from
Sep 15, 2023

Conversation

zxdvd
Copy link
Contributor

@zxdvd zxdvd commented Sep 15, 2023

After build and install from source, I got following problems. ldconfig fix it.

I think this should fix

File ~/.local/lib/python3.11/site-packages/ctranslate2/__init__.py:21
     18         ctypes.CDLL(library)
     20 try:
---> 21     from ctranslate2._ext import (
     22         AsyncGenerationResult,
     23         AsyncScoringResult,
     24         AsyncTranslationResult,
     25         DataType,
     26         Encoder,
     27         EncoderForwardOutput,
     28         ExecutionStats,
     29         GenerationResult,
     30         GenerationStepResult,
     31         Generator,
     32         ScoringResult,
     33         StorageView,
     34         TranslationResult,
     35         Translator,
     36         contains_model,
     37         get_cuda_device_count,
     38         get_supported_compute_types,
     39         set_random_seed,
     40     )
     41     from ctranslate2.extensions import register_extensions
     42     from ctranslate2.logging import get_log_level, set_log_level

ImportError: libctranslate2.so.3: cannot open shared object file: No such file or directory

And ldd got following

ldd ctranslate2/_ext.cpython-311-x86_64-linux-gnu.so
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
        linux-vdso.so.1 (0x00007fff777fb000)
        libctranslate2.so.3 => not found
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1361169000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1361149000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1360f21000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f136147f000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1360e3a000)

1. prefer sudo make install to avoid permission problem
2. add ldconfig to avoid 'libctranslate2.so.3: cannot open shared object file'
@guillaumekln guillaumekln merged commit 0d1424d into OpenNMT:master Sep 15, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants