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

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

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. IndexedDB 教程

    IndexedDB 教程 IndexedDB 是一个基于 JavaScript 的面向对象的事务型数据库.有了 LocalStorage 和 Cookies,为什么还要推出 indexedDB 呢?其 ...

  2. [转]kindeditor隐藏上传图片框网络图片或本地上传的功能

    原文地址:http://www.lingchenliang.com/post/154.html kindeditor富文本编辑器点击上传图片按钮,在弹出的窗口中去掉上传网络图片的功能,只留下本地上传, ...

  3. [转]让iframe自适应高度-真正解决

    原文地址:https://www.cnblogs.com/rogge7/p/7762052.html 需求:实现 iframe 的自适应高度,能够随着页面的长度自动的适应以免除页面和 iframe 同 ...

  4. 21 go并发编程-下

    如何等待一组goroutine结束 1. 使用不带缓冲区的channel实现. 原理: 每个goroutine都往一个channel里写入一个值,然后我们去遍历这个管道的数值,由于不带缓冲区,那么必须 ...

  5. Redis密码设置与访问限制

    https://www.cnblogs.com/ghjbk/p/7682041.html https://ruby-china.org/topics/28094

  6. Android学习:AlertDialog对话框

    AlertDialog可以生成各种内容的对话框,它生成的对话框包含4个区域:图标区,标题区,内容区,按钮区 <?xml version="1.0" encoding=&quo ...

  7. 谈一谈 MPU6050 姿态融合(转)

    姿态角(Euler角)pitch yaw roll飞行器的姿态角并不是指哪个角度,是三个角度的统称.它们是:俯仰.滚转.偏航.你可以想象是飞机围绕XYZ三个轴分别转动形成的夹角. 地面坐标系(eart ...

  8. C#串口小助手

    做技术的通病,什么都想学,什么都想亲手做一遍.不然总感觉心里不踏实. 考研期间,利用晚上一点时间,照葫芦画瓢,练习使用c#快速开发一个简单的串口小助手. 这种前后端分离的设计方法,大大提高了开发速度, ...

  9. python2.7.X 升级至Python3.6.X

    安装Python3 项目是在py3环境下进行编码的,正好yczhang默认的py版本是2,我们还需要安装py3才能让程序run起来,在此之前,需要安装开发工具包,因为要编译安装Python [root ...

  10. OOD之问题空间到解空间—附FP的建模

    通常会被问到,什么事OOD,然后大部分人期待的答案比较死板,继承.封装.多态!懂这个的人多的去了,有什么好问?回答出来的人是否拿着Java又去做一些面向过程的勾当? 计算机革命起源于机器,因此编程语言 ...