ubuntu 下 QT調用腳本無效 切換默認sh爲bash或者dash

程序

QProcess::execute("sh gpu_ivus.sh");
#!/bin/bash
source /home/ubuntu/anaconda3/bin/activate base
python deeplabv3plus_multichannels.py --dataroot 'KeyFrames' --saveroot 'KeyAI'

報錯

  找不到 source
  找不到 python

原因

  dash不支持,需要默認sh切換爲bash

解決辦法

ls -l /bin/sh
sudo dpkg-reconfigure dash  #選擇否
ls -l /bin/sh
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章