简体   繁体   English

无法打开文件'python':[Errno 2]没有这样的文件或目录

[英]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.

相关问题 python:无法打开文件'python2':[Errno 2]没有这样的文件或目录 - python: can't open file 'python2': [Errno 2] No such file or directory python:无法打开文件“帮助”:[Errno 2]没有此类文件或目录 - python: can't open file 'help': [Errno 2] No such file or directory python:无法打开文件“C:\\Program”:[Errno 2] 没有这样的文件或目录 - python: can't open file 'C:\Program': [Errno 2] No such file or directory 无法打开文件:[Errno 2] 没有那个文件或目录 - can't open file : [Errno 2] No such file or directory 无法打开文件:[Errno 2] 没有那个文件或目录 - can't open file : [Errno 2] No such file or directory 无法打开文件 [Errno 2] 没有这样的文件或目录 - Can't Open File [Errno 2 ] No such file or directory 无法打开文件'file.py':[Errno 2] 没有这样的文件或目录 - Can't open file 'file.py': [Errno 2] No such file or directory PyCharm 没有找到 Anaconda Python,给出“无法打开文件 'python':[Errno 2] 没有这样的文件或目录?” - PyCharm not finding Anaconda Python, giving "can't open file 'python': [Errno 2] No such file or directory?" python:无法打开文件'python DACscrap.py&':[Errno 2]没有这样的文件或目录…但是可以吗? - python: can't open file 'python DACscrap.py &': [Errno 2] No such file or directory… but it does? PyCharm 没有找到 Anaconda Python,给出“无法打开文件 'python.py':[Errno 2] 没有这样的文件或目录?” - PyCharm not finding Anaconda Python, giving “can't open file 'python.py': [Errno 2] No such file or directory?”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM