使用Geany IDE(Raspberry Pi Raspbian)执行.py文件时出现权限被拒绝错误

2024-09-29 17:09:54 发布

您现在位置:Python中文网/ 问答频道 /正文

我配置了一个python3虚拟环境,并将路径添加到Geany的executebuild命令中。 现在,如果我尝试使用Geany执行.py文件,则会出现以下错误:

Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.

/tmp/geany_run_script_5J3UG0.sh: 7: /tmp/geany_run_script_5J3UG0.sh: /home/pi/PyProjekte/pytorchenv1/bin: Permission denied


------------------
(program exited with code: 126)

我已经尝试了以下命令: chmod +x ~/PyProjekte/pytorchenv1/bin 以及: chmod +x /tmp/geany_run_script_5J3UG0.sh 但是如果我尝试对.sh文件进行chmod,它会告诉我.sh文件不可用

我希望你能帮我。 如果我在虚拟环境中使用命令行手动执行.py文件,它将正常执行,但我希望能够从Geany执行它

这是我在Geany中添加到Execute命令的内容: /home/pi/PyProjekte/pytorchenv1/bin "%f"


Tags: 文件runpy命令homebinsh虚拟环境

热门问题