![](/img/trans.png)
[英]ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
[英]Q: python (using cutadapt in bash script on cluster): libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
我在使用程序cutadapt(利用python)的群集上运行bash脚本。
在运行脚本之前,我已加载python 3.7.0版和cutadapt
alias python=python3
module load python/3.7.0
pip3 install --user --upgrade cutadapt
然后通过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
$LD_LIBRARY_PATH
似乎不是问题,因为echo $LD_LIBRARY_PATH
显示优先列出了/u/local/apps/python/3.7.0/lib
。
另外, 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)
此外,以与我的脚本相同的方式调用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.
我的同龄人已经运行几乎完全相同的代码和脚本,并且脚本中止/此错误消息没有问题。
预先感谢您对如何解决此问题的任何建议!
编辑(感谢您的反馈!):
这是我提交的脚本(除了集群上不同的主目录和不同的输出目录外,与我的对等方几乎相同):
#-- 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
$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
但是然后在我完成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
我更新了脚本以确保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
错误仍然存在,并且生成的foo.txt
文件完全空白,这意味着在脚本通过qsub
运行时, $LD_LIBRARY_PATH
被重置为空白。
因此,我在脚本中添加了一行,现在为我的代码在查找$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.