mac 在终端上运行脚本,提示PermissionError: [Errno 1] Operation not permitted
Posted Jason_WangYing
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mac 在终端上运行脚本,提示PermissionError: [Errno 1] Operation not permitted相关的知识,希望对你有一定的参考价值。
今天在终端上运行脚本时,提示权限不足PermissionError: [Errno 1] Operation not permitted
解决办法是给脚本个超级权限
173-16-0-191:~ wangying$ sudo ipython
Password:
Python 3.7.6 (v3.7.6:43364a7ae0, Dec 18 2019, 14:12:53)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from pythonping import ping
In [2]: ping('192.169.0.1')
Out[2]:
Reply from 192.169.0.1, 29 bytes in 2.52ms
Reply from 192.169.0.1, 29 bytes in 1.61ms
Reply from 192.169.0.1, 29 bytes in 1.44ms
Reply from 192.169.0.1, 29 bytes in 1.79ms
Round Trip Times min/avg/max is 1.44/1.84/2.52 ms
以上是关于mac 在终端上运行脚本,提示PermissionError: [Errno 1] Operation not permitted的主要内容,如果未能解决你的问题,请参考以下文章
Mac 终端提示 Permission denied 权限问题
IOSmac终端运行.sh文件总是提示permission denied