这个错误很容易引起误解,一般人都会认为是命令执行了,但是命令找不到作为参数对应的文件或者目录。其实还有一层含义,就是这个命令找不到,命令找不到,也会报没有这个文件或者目录的错误。

为什么找不到这个命令呢?

1. 格式错误,不能直接传入字符串,如果直接传入字符串,需要设置shell=True,这种方法不被推荐,有安全隐患

2. 环境变量的配置,路径没有配置正确,找不到这个bin,创建子进程,因为没有执行/etc/profile的配置脚本,所以环境变量没有这个路径, 所以一般脚本执行都像这样写全路径 /usr/bin/python, 避免找不到python这个命令。

Python subprocess.Popen() error (No such file or directory)的更多相关文章

  1. python subprocess popen 静默模式(不弹出console控制台)

    python subprocess popen 静默模式(不弹出console控制台) import subprocess,sys IS_WIN32 = 'win32' in str(sys.plat ...

  2. 解决clang: error: no such file or directory: such file or directory:的问题

    一,详细问题描述 clang: error: no such file or directory: 'xxx/src/GGBaCollectionViewCell.m' clang: error: n ...

  3. clang: error: no such file or directory: xxx.pch

    今天打开一个下载的例子 报clang: error: no such file or directory: xxx.pch的错 说一下解决方案 1.先在你的工程里找到这.pch文件- 2.把它现在的路 ...

  4. clang: error: no such file or directory: 报错

    clang: error: no such file or directory: '/Users/KuaiYong/Desktop/svn/gamebox_v1.2/SettingViewContro ...

  5. docker iotop :OSError: Netlink error: No such file or directory

    在容器内使用iotop ,错误信息: raceback (most recent call last): File "/usr/sbin/iotop", line 16, in & ...

  6. vue报错 Module not found: Error: Cannot resolve 'file' or 'directory'

    炸了,我好写sell而组件,直接就用了,我的天哪 看你的写了吗,就用: Module not found: Error: Cannot resolve 'file' or 'directory' 页另 ...

  7. CMake error:System Error:No such file or directory CMake error:Could not open file for write in copy operation xxxx.ros_Config.cmake.tmp.

    微型电脑或嵌入式与电脑还是有点不同的,在微型电脑上ros indigo 版本下利用catkin编译如果你遇到如下错误: CMake error:System Error:No such file or ...

  8. window下编写python脚本在linux下运行出错 usr/bin/python^M: bad interpreter: No such file or directory

    今天在windows下使用notepad++写了个python脚本,传到linux服务器执行后提示:-bash: ./logger.py: usr/bin/python^M: bad interpre ...

  9. Xcode编译报错:< Apple Mach-O Linker Warning > clang: error: no such file or directory: 'xxxx'

    Xcode编译报错概述: clang: error: no such file or directory: 'CoreGraphics' 一般原因是链接库内容导入丢失,这种的排查下target - B ...

随机推荐

  1. 【资料下载区】【GK101固件】更新日期2017/1/11

    <GK101任意波发生器>升级固件发布(版本:1.0.2build539)<GK101任意波发生器>升级固件发布(版本:1.0.2build851)<GK101任意波发生 ...

  2. WPF ViewModelLocator

    在WPF中应用ViewModelLocator <Window x:Class="Demo.Views.MainWindow" ... xmlns:prism="h ...

  3. 【Unity】通用的Debugger日志模块

    模块代码整理自 http://gad.qq.com/lore/catalog/10007 Debugger类.提供打印日志的静态方法. using System; using System.IO; n ...

  4. 利用Layer组件弹出多个对话框(非嵌套)与关闭及刷新

    页面A中弹出页面B,在页面B中弹出页面C,在layer做嵌套ifframe弹出时会遇到C页面被嵌套在B页面中,如果C尺寸大于B,则C将不能显示完整.这个时候可以考虑B,C页面均由A页面弹出从而避免嵌套 ...

  5. R语言 启动报错 *** glibc detected *** /usr/lib64/R/bin/exec/R: free(): invalid next size (fast): 0x000000000263a420 *** 错误 解决方案

    *** glibc detected *** /usr/lib64/R/bin/exec/R: free(): invalid next size (fast): 0x000000000263a420 ...

  6. WPS Office手机版调用接口代码指导帖之二 [复制链接]

    原文链接:http://bbs.wps.cn/thread-22349340-1-1.html 从V5.1版本开始,WPS移动版本提供了额外的功能,可以供第三方程序通过集成的方式调用“WPS移动版”打 ...

  7. 【转载】浅析依赖倒置(DIP)、控制反转(IOC)和依赖注入(DI)

    原文地址 http://blog.csdn.net/briblue/article/details/75093382 写这篇文章的原因是这两天在编写关于 Dagger2 主题的博文时,花了大量的精力来 ...

  8. 简单Java动态代理实现

    package test; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import ja ...

  9. Python学习笔记(三)

    组合数据类型 5种内置的序列类型:bytearray,bytes,list,str,tuple 元组 元组:固定,有序,索引从0开始,分片,步距语法支持 不能替换或者删除其中的任意数据项,使用list ...

  10. 编译PHP扩展amqp & php消息队列 rabbitmq

    首先介绍下AMQP: AMQP——高级消息队列协议,目前比较有名气的实现大概就是大名鼎鼎的RabbitMQ了. RabbitMQ是一个在AMQP基础上完成的,可复用的企业消息系统.他遵循Mozilla ...