Yasas1994 / Jaeger

Jaeger is a quick and precise tool for detecting phages in sequence assemblies.
MIT License
24 stars 1 forks source link

tensorflow installation error #20

Closed lxsteiner closed 1 month ago

lxsteiner commented 1 month ago

Thanks for this interesting tool!

Unfortunately ran into some issues with the installation and some Tensorflow error it seems. Could you please take a look and maybe give some feedback what the issue might be?

$ Jaeger -h
Traceback (most recent call last):
  File "//.conda/envs/jaeger-1.1.26_env/bin/Jaeger", line 29, in <module>
    import tensorflow as tf
  File "//.conda/envs/jaeger-1.1.26_env/lib/python3.9/site-packages/tensorflow/__init__.py", line 40, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "//.conda/envs/jaeger-1.1.26_env/lib/python3.9/site-packages/tensorflow/python/pywrap_tensorflow.py", line 34, in <module>
    self_check.preload_check()
  File "//.conda/envs/jaeger-1.1.26_env/lib/python3.9/site-packages/tensorflow/python/platform/self_check.py", line 63, in preload_check
    from tensorflow.python.platform import _pywrap_cpu_feature_guard
ImportError: //.conda/envs/jaeger-1.1.26_env/lib/python3.9/site-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2: undefined symbol: _ZTIN6snappy4SinkE

I get the same error on different machines. I am trying to get it to run with CPU only first and it seems like the CPU version of Tensorflow is being used/installed correctly:

tensorflow                2.15.0          cpu_py39h433cda9_2    conda-forge

Mamba environment setup:

$ mamba create -n jaeger-1.1.26_env -c bioconda -c conda-forge -c defaults python=3.9 pip jaeger-bio

Here the full output of the environment:

$ conda list
# packages in environment at //.conda/envs/jaeger-1.1.26_env:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
absl-py                   2.1.0            py39h06a4308_0
aiohappyeyeballs          2.4.0            py39h06a4308_0
aiohttp                   3.10.5           py39h5eee18b_0
aiosignal                 1.2.0              pyhd3eb1b0_0
astunparse                1.6.3                      py_0
async-timeout             4.0.3            py39h06a4308_0
attrs                     23.1.0           py39h06a4308_0
biopython                 1.78             py39h7f8727e_0
blas                      1.0                    openblas
blinker                   1.6.2            py39h06a4308_0
bottleneck                1.3.7            py39ha9d4c09_0
brotli                    1.0.9                h5eee18b_8
brotli-bin                1.0.9                h5eee18b_8
brotli-python             1.0.9            py39h6a678d5_8
c-ares                    1.33.1               heb4867d_0    conda-forge
ca-certificates           2024.7.2             h06a4308_0
cachetools                5.3.3            py39h06a4308_0
certifi                   2024.8.30        py39h06a4308_0
cffi                      1.17.1           py39h1fdaa30_0
charset-normalizer        3.3.2              pyhd3eb1b0_0
click                     8.1.7            py39h06a4308_0
contourpy                 1.2.0            py39hdb19cb5_0
cryptography              43.0.0           py39hdda0065_0
cycler                    0.11.0             pyhd3eb1b0_0
flatbuffers               23.5.26              h59595ed_1    conda-forge
fonttools                 4.51.0           py39h5eee18b_0
freetype                  2.12.1               h4a9f257_0
frozenlist                1.4.0            py39h5eee18b_0
gast                      0.5.3              pyhd3eb1b0_0
giflib                    5.2.1                h5eee18b_3
google-auth               2.29.0           py39h06a4308_0
google-auth-oauthlib      0.5.2            py39h06a4308_0
google-pasta              0.2.0              pyhd3eb1b0_0
grpcio                    1.59.3           py39h174d805_0    conda-forge
h5py                      3.11.0           py39hbe37b52_0
hdf5                      1.12.1               h2b7332f_3
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.7              py39h06a4308_0
importlib-metadata        7.0.1            py39h06a4308_0
importlib_resources       6.4.0            py39h06a4308_0
jaeger-bio                1.1.26             pyhdfd78af_0    bioconda
joblib                    1.4.2            py39h06a4308_0
keras                     2.15.0             pyhd8ed1ab_0    conda-forge
kiwisolver                1.4.4            py39h6a678d5_0
kneed                     0.8.5              pyhd8ed1ab_0    conda-forge
krb5                      1.20.1               h143b758_1
lcms2                     2.16                 hb7c19ff_0    conda-forge
ld_impl_linux-64          2.40                 h12ee557_0
lerc                      4.0.0                h27087fc_0    conda-forge
libabseil                 20230802.1      cxx17_h59595ed_0    conda-forge
libbrotlicommon           1.0.9                h5eee18b_8
libbrotlidec              1.0.9                h5eee18b_8
libbrotlienc              1.0.9                h5eee18b_8
libcurl                   8.9.1                h251f7ec_0
libdeflate                1.20                 hd590300_0    conda-forge
libedit                   3.1.20230828         h5eee18b_0
libev                     4.33                 h7f8727e_1
libffi                    3.4.4                h6a678d5_1
libgcc                    14.1.0               h77fa898_1    conda-forge
libgcc-ng                 14.1.0               h69a702a_1    conda-forge
libgfortran-ng            11.2.0               h00389a5_1
libgfortran5              11.2.0               h1234567_1
libgomp                   14.1.0               h77fa898_1    conda-forge
libgrpc                   1.59.3               hd6c4280_0    conda-forge
libjpeg-turbo             3.0.3                h5eee18b_0
libnghttp2                1.57.0               h2d74bed_0
libopenblas               0.3.21               h043d6bf_0
libpng                    1.6.39               h5eee18b_0
libprotobuf               4.24.4               hf27288f_0    conda-forge
libre2-11                 2023.09.01           h7a70373_1    conda-forge
libsqlite                 3.46.0               hde9e2c9_0    conda-forge
libssh2                   1.11.0               h251f7ec_0
libstdcxx                 14.1.0               hc0a3c3a_1    conda-forge
libstdcxx-ng              14.1.0               h4852527_1    conda-forge
libtiff                   4.6.0                h1dd3fc0_3    conda-forge
libwebp-base              1.3.2                h5eee18b_0
libxcb                    1.15                 h7f8727e_0
libzlib                   1.2.13               h4ab18f5_6    conda-forge
lz4-c                     1.9.4                h6a678d5_1
markdown                  3.4.1            py39h06a4308_0
markupsafe                2.1.3            py39h5eee18b_0
matplotlib-base           3.9.2            py39hbfdbfaf_0
ml_dtypes                 0.2.0            py39h1128e8f_0
multidict                 6.0.4            py39h5eee18b_0
ncurses                   6.4                  h6a678d5_0
numexpr                   2.8.7            py39h286c3b5_0
numpy                     1.26.4           py39heeff2f4_0
numpy-base                1.26.4           py39h8a23956_0
oauthlib                  3.2.2            py39h06a4308_0
openjpeg                  2.5.2                he7f1fd0_0
openssl                   3.3.2                hb9d3cd8_0    conda-forge
opt_einsum                3.3.0              pyhd3eb1b0_1
packaging                 24.1             py39h06a4308_0
pandas                    2.2.2            py39h6a678d5_0
parasail-python           1.3.4            py39heaaa4ec_2    bioconda
pillow                    10.3.0           py39h90c7501_0    conda-forge
pip                       24.2             py39h06a4308_0
protobuf                  4.24.4           py39h60f6b12_0    conda-forge
psutil                    5.9.0            py39h5eee18b_0
pyasn1                    0.4.8              pyhd3eb1b0_0
pyasn1-modules            0.2.8                      py_0
pybind11-abi              4                    hd3eb1b0_1
pycparser                 2.21               pyhd3eb1b0_0
pyjwt                     2.8.0            py39h06a4308_0
pyopenssl                 24.2.1           py39h06a4308_0
pyparsing                 3.1.2            py39h06a4308_0
pysocks                   1.7.1            py39h06a4308_0
python                    3.9.19               h955ad1f_1
python-dateutil           2.9.0post0       py39h06a4308_2
python-flatbuffers        24.3.25          py39h06a4308_0
python-tzdata             2023.3             pyhd3eb1b0_0
python_abi                3.9                      2_cp39    conda-forge
pytz                      2024.1           py39h06a4308_0
re2                       2023.09.01           h7f4b329_1    conda-forge
readline                  8.2                  h5eee18b_0
requests                  2.32.3           py39h06a4308_0
requests-oauthlib         2.0.0            py39h06a4308_0
rsa                       4.7.2              pyhd3eb1b0_1
ruptures                  1.1.9            py39h988be6c_2    conda-forge
scikit-learn              1.3.2            py39ha22ef79_2    conda-forge
scipy                     1.13.1           py39heeff2f4_0
seaborn                   0.13.2           py39h06a4308_0
setuptools                75.1.0           py39h06a4308_0
six                       1.16.0             pyhd3eb1b0_1
snappy                    1.1.10               h6a678d5_1
sqlite                    3.45.3               h5eee18b_0
tensorboard               2.15.2             pyhd8ed1ab_0    conda-forge
tensorboard-data-server   0.7.0            py39h52d8a92_1
tensorflow                2.15.0          cpu_py39h433cda9_2    conda-forge
tensorflow-base           2.15.0          cpu_py39he1df281_2    conda-forge
tensorflow-estimator      2.15.0          cpu_py39hd56b5fd_2    conda-forge
termcolor                 2.1.0            py39h06a4308_0
threadpoolctl             3.5.0            py39h2f386ee_0
tk                        8.6.14               h39e8969_0
tqdm                      4.66.5           py39h2f386ee_0
typing_extensions         4.11.0           py39h06a4308_0
tzdata                    2024a                h04d1e81_0
unicodedata2              15.1.0           py39h5eee18b_0
urllib3                   2.2.2            py39h06a4308_0
werkzeug                  3.0.3            py39h06a4308_0
wheel                     0.44.0           py39h06a4308_0
wrapt                     1.14.1           py39h5eee18b_0
xz                        5.4.6                h5eee18b_1
yarl                      1.11.0           py39h5eee18b_0
zipp                      3.17.0           py39h06a4308_0
zlib                      1.2.13               h4ab18f5_6    conda-forge
zstd                      1.5.5                hc292b87_2

Here the system info:

$ hostnamectl
   Static hostname: 
         Icon name: computer-server
           Chassis: server
        Machine ID: 0e6b315adb11916ccc128a8bb14e4443
           Boot ID: ab0e8e179adc444fbdfc1e827f40fbbc
  Operating System: Rocky Linux 8.6 (Green Obsidian)
       CPE OS Name: cpe:/o:rocky:rocky:8:GA
            Kernel: Linux 4.18.0-372.26.1.el8_6.x86_64
      Architecture: x86-64

Thanks!

lxsteiner commented 1 month ago

Update: seemed like it might have been a channel priority issue. Eventually got it working by also installing jaeger-bio within an activated environment mamba create -n jaeger-1.1.26_env -c bioconda -c conda-forge -c defaults python=3.9 pip for whatever reason, rather than mamba create -n jaeger-1.1.26_env -c bioconda -c conda-forge -c defaults python=3.9 pip jaeger-bio.

Sorry for the confusion!

PS. The pip installation alternative did not work for me, even though the installation gave no errors, and gives a memory error for whatever reason:

$ Jaeger -h
*** Error in `//miniconda3/envs/jaeger-1.1.26_env/bin/python3.9': double free or corruption (!prev): 0x000055d36c073580 ***
Aborted (core dumped)
$ mamba create -n jaeger-1.1.26_env -c conda-forge -c bioconda -c defaults python=3.9 pip
$ pip install jaeger-bio