简体   繁体   English

问:python(在集群的bash脚本中使用cutadapt):libpython3.7m.so.1.0:无法打开共享对象文件:无此类文件或目录

[英]Q: python (using cutadapt in bash script on cluster): libpython3.7m.so.1.0: cannot open shared object file: No such file or directory

I'm running a bash script on a cluster in which the program cutadapt (which utilizes python) is used. 我在使用程序cutadapt(利用python)的群集上运行bash脚本。

Before I run my script, I loaded python version 3.7.0 and cutadapt 在运行脚本之前,我已加载python 3.7.0版和cutadapt

alias python=python3
module load python/3.7.0
pip3 install --user --upgrade cutadapt

and then send it off via qsub but the job keeps aborting early & I keep getting the following error: 然后通过qsub将其发送出去,但是该作业一直在提前中止,并且我不断收到以下错误:

/u/local/apps/python/3.7.0/bin/python3: 
error while loading shared libraries: libpython3.7m.so.1.0: 
cannot open shared object file: No such file or directory

It doesn't seem to be an issue with the $LD_LIBRARY_PATH since echo $LD_LIBRARY_PATH shows that the /u/local/apps/python/3.7.0/lib is preferentially listed. $LD_LIBRARY_PATH似乎不是问题,因为echo $LD_LIBRARY_PATH显示优先列出了/u/local/apps/python/3.7.0/lib

Also, ldd /u/local/apps/python/3.7.0/bin/python3 shows that libpython3.7m.so.1.0 is found and points to: 另外, ldd /u/local/apps/python/3.7.0/bin/python3显示找到libpython3.7m.so.1.0并指向:

libpython3.7m.so.1.0 => 
/u/local/apps/python/3.7.0/lib/libpython3.7m.so.1.0 (0x00007f66e01f6000) 

Additionally, calling cutadapt in the same manner as my script appears to be working properly: 此外,以与我的脚本相同的方式调用cutadapt似乎正常工作:

~/.local/bin/cutadapt

This is cutadapt 2.3 with Python 3.7.0
Command line parameters:

Run "cutadapt --help" to see command-line options.
See https://cutadapt.readthedocs.io/ for full documentation.

My peer has run pretty much the exact same code and script and has had no issues with the script aborting/this error message. 我的同龄人已经运行几乎完全相同的代码和脚本,并且脚本中止/此错误消息没有问题。

Thank you in advance for any suggestions as to how I can troubleshoot this issue! 预先感谢您对如何解决此问题的任何建议!

Edit (Thank you for your feedback!): 编辑(感谢您的反馈!):

This is the script I submitted (which is nearly identical to my peer's aside from a different home directory on the cluster and different output directory): 这是我提交的脚本(除了集群上不同的主目录和不同的输出目录外,与我的对等方几乎相同):

#-- trim00s.sh --#
#!/bin/bash
#runs cutadapt on files 01-09

for i in {1..9}
do
fastq="Index0${i}.for.fq"
trimmedFastq="Index0${i}_trimmed.for.fq"
/u/home/e/evanderw/.local/bin/cutadapt -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNATCTCGTATGCCGTCTTCTGCTTG -a "A{10}" -a "T{10}" -m 15 -q 30 -o ../../04_trimmed/lane_2/$trimmedFastq $fastq
done

The $LD_LIBRARY_PATH is the following after I first log onto the cluster (I'm guessing it's automatically set to these libraries as a default for this cluster?): $LD_LIBRARY_PATH是我第一次登录到集群后的内容(我想它会自动设置为这些集群的默认库吗?):

echo $LD_LIBRARY_PATH
/u/local/compilers/intel-cs/2013.0.028/mpi/intel64/lib:
/u/local/compilers/intel-cs/2013.0.028/itac/intel64/itac/slib_impi4:
/u/local/compilers/intel-cs/2013.0.028/composer_xe/compiler/lib/intel64:
/opt/intel/mic/coi/host-linux-release/lib:
/opt/intel/mic/myo/lib:
/u/local/compilers/intel-cs/2013.0.028/composer_xe/mpirt/bin/intel64:
/u/local/compilers/intel-cs/2013.0.028/composer_xe/ipp/lib/intel64:
/u/local/compilers/intel-cs/2013.0.028/composer_xe/mkl/lib/intel64:
/u/local/compilers/intel-cs/2013.0.028/composer_xe/tbb/lib/intel64

But then it changes after I have done alias python=python3 and module load python/3.7.0 to: 但是然后在我完成alias python=python3并将module load python/3.7.0更改为后,它会更改:

echo $LD_LIBRARY_PATH
/u/local/apps/python/3.7.0/lib:
/u/local/compilers/intel/17.0.1/compilers_and_libraries_2017.1.132/linux/mkl/lib/intel64:
/u/local/apps/xz/5.2.3/lib:
/u/local/apps/openssl/1.1.1/lib:
/u/local/apps/mpfr/3.1.5/gcc-4.9.3/lib:
/u/local/apps/hdf5/1.8.18/gcc-4.4.7-shared/lib:
/u/local/compilers/gcc/4.9.3/lib:
/u/local/compilers/gcc/4.9.3/lib64:
/u/local/compilers/intel-cs/2013.0.028/mpi/intel64/lib:
/u/local/compilers/intel-cs/2013.0.028/itac/intel64/itac/slib_impi4:
/u/local/compilers/intel-cs/2013.0.028/composer_xe/compiler/lib/intel64:
/opt/intel/mic/coi/host-linux-release/lib:
/opt/intel/mic/myo/lib:
/u/local/compilers/intel-cs/2013.0.028/composer_xe/mpirt/bin/intel64:
/u/local/compilers/intel-cs/2013.0.028/composer_xe/ipp/lib/intel64:
/u/local/compilers/intel-cs/2013.0.028/composer_xe/mkl/lib/intel64:
/u/local/compilers/intel-cs/2013.0.028/composer_xe/tbb/lib/intel64

I updated the script to ensure that the shebang was the first line & then printed off the $LD_LIBRARY_PATH as a text file: 我更新了脚本以确保shebang是第一行,然后将$LD_LIBRARY_PATH打印为文本文件:

#!/bin/bash

#-- trim00s.sh --#
#runs cutadapt on files 01-09

echo $LD_LIBRARY_PATH >foo.txt

for i in {1..9}
do
fastq="Index0${i}.for.fq"
trimmedFastq="Index0${i}_trimmed.for.fq"
/u/home/e/evanderw/.local/bin/cutadapt -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNATCTCGTATGCCGTCTTCTGCTTG -a "A{10}" -a "T{10}" -m 15 -q 30 -o ../../04_trimmed/lane_2/$trimmedFastq $fastq
done

The error still persisted & the resulting foo.txt file was completely blank, meaning $LD_LIBRARY_PATH was reset to blank while the script was running via qsub . 错误仍然存​​在,并且生成的foo.txt文件完全空白,这意味着在脚本通过qsub运行时, $LD_LIBRARY_PATH被重置为空白。

So, I included a line in my script to now add the directory for the library my code was having problems finding to my $LD_LIBRARY_PATH & it worked! 因此,我在脚本中添加了一行,现在为我的代码在查找$LD_LIBRARY_PATH时遇到问题的库添加目录,并且该目录有效!

#!/bin/bash

#-- trim00s.sh --#
#runs cutadapt on files 01-09

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/u/local/apps/python/3.7.0/lib


for i in {1..9}
do
fastq="Index0${i}.for.fq"
trimmedFastq="Index0${i}_trimmed.for.fq"
/u/home/e/evanderw/.local/bin/cutadapt -a GATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNATCTCGTATGCCGTCTTCTGCTTG -a "A{10}" -a "T{10}" -m 15 -q 30 -o ../../04_trimmed/lane_2/$trimmedFastq $fastq
done

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ImportError:libpython3.7m.so.1.0:无法打开共享 object 文件:没有这样的文件或目录 - ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory 加载共享库 libpython3.7m.so.1.0 时出错:没有这样的文件或目录(/usr/local/bin/coverage 需要) - Error loading shared library libpython3.7m.so.1.0: No such file or directory (needed by /usr/local/bin/coverage) python:加载共享库时出错:libpython3.4m.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - python: error while loading shared libraries: libpython3.4m.so.1.0: cannot open shared object file: No such file or directory 加载共享库时出现 Python 错误:libpython3.5m.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - Python error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory Python3.7:加载共享库时出错:libpython3.7m.so.1.0 - Python3.7: error while loading shared libraries: libpython3.7m.so.1.0 Python3.5 导入错误:libpython3.5m.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - Python3.5 ImportError: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory Docker:libpython2.7.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - Docker: libpython2.7.so.1.0: cannot open shared object file: No such file or directory libpython2.7.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - libpython2.7.so.1.0: cannot open shared object file: No such file or directory ImportError: libpython3.8.so.1.0: 无法打开共享对象文件: 没有那个文件或目录 - ImportError: libpython3.8.so.1.0: cannot open shared object file: No such file or directory Pyinstaller:无法打开共享对象 libpython3.5m.so.1.0 - Pyinstaller: Cannot open shared object libpython3.5m.so.1.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM