I use subprocess.popen in python3 to put files or make directories in hdfs. it runs accurately using python3 on the Linux shell. but as I use crontab to run the code, I get "FileNotFoundError: [Errno 2] No such file or directory: 'hdfs': 'hdfs'" Error on my log file.
make_dir = subprocess.Popen(['hdfs','dfs','-mkdir' , '-p' , hdfs_path])