[英]can't open file 'python': [Errno 2] No such file or directory
I am writing a job submission script for SLURM workload manager. 我正在为SLURM工作负载管理器编写作业提交脚本。 First, I have loaded anaconda2/4.5.12 (including Python 2.7) module.
首先,我已经加载了anaconda2 / 4.5.12(包括Python 2.7)模块。 Then, I have created the Conda environment with Python3.6 version.
然后,我用Python3.6版本创建了Conda环境。 I try to submit the script using "sbatch" command, but I get this error "python: can't open file
我尝试使用“sbatch”命令提交脚本,但我收到此错误“python:无法打开文件
python: [Errno 2] No such file or directory
This is an example of my script: 这是我的脚本的一个例子:
#!/bin/bash
#
#SBATCH --job-name=taxjob
#SBATCH --nodes=4
#SBATCH --tasks-per-node=3
#SBATCH --time=0-03:00:00
#SBATCH --partition=shortq
#SBATCH --mem=24GB
#SBATCH --output=/home/s.e/tax/Ftest-%j.out
#SBATCH --error=/home/s.e/tax/Ftest-%j.err
RUNPATH=/home/s.e/tax/
cd $RUNPATH
source /home/s.e/.bashrc
source activate py36
python test.py
As RnD says it could be just a problem of PATH: what is the answer when you echo $PATH
the line after the source...
? 正如RnD所说,这可能只是PATH的一个问题:当你在
source...
之后echo $PATH
后,答案是什么? Maybe also you need to call python3
rather than python
. 也许你需要调用
python3
而不是python
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.