如何将脚本移至路径?

如何将脚本移至路径?

我尝试Whisper通过 OpenAI 安装,安装后 7 个脚本向我发送了此错误:

  WARNING: The script lit is installed in '/home/yamada/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts cmake, cpack and ctest are installed in '/home/yamada/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script tqdm is installed in '/home/yamada/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script isympy is installed in '/home/yamada/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts f2py, f2py3 and f2py3.10 are installed in '/home/yamada/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script normalizer is installed in '/home/yamada/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts convert-caffe2-to-onnx, convert-onnx-to-caffe2 and torchrun are installed in '/home/yamada/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script whisper is installed in '/home/yamada/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed charset-normalizer-3.1.0 cmake-3.26.1 ffmpeg-python-0.2.0 filelock-3.10.7 jinja2-3.1.2 lit-16.0.0 llvmlite-0.39.1 mpmath-1.3.0 networkx-3.1 numba-0.56.4 numpy-1.23.5 nvidia-cublas-cu11-11.10.3.66 nvidia-cuda-cupti-cu11-11.7.101 nvidia-cuda-nvrtc-cu11-11.7.99 nvidia-cuda-runtime-cu11-11.7.99 nvidia-cudnn-cu11-8.5.0.96 nvidia-cufft-cu11-10.9.0.58 nvidia-curand-cu11-10.2.10.91 nvidia-cusolver-cu11-11.4.0.1 nvidia-cusparse-cu11-11.7.4.91 nvidia-nccl-cu11-2.14.3 nvidia-nvtx-cu11-11.7.91 openai-whisper-20230314 regex-2023.3.23 requests-2.28.2 sympy-1.11.1 tiktoken-0.3.1 torch-2.0.0 tqdm-4.65.0 triton-2.0.0 typing-extensions-4.5.0
yamada@yamada-PC:~$ 

如何将这 7 个脚本移至 PATH?我安装这个程序时没有打开终端,但我可以重新安装 Ubuntu 并再次执行所有操作。老实说,我不知道该怎么办。我想要一份有关如何解决此问题的分步指南。谢谢

我使用Ubuntu 22.04

答案1

使用您喜欢的编辑器,可以是 gedit、nano...

打开~/.bashrc,然后搜索图案PATH

如果存在(例如:):

export PATH:/bin:/usr/bin:/usr/local/bin

添加您的新目录:

export PATH:/home/yamada/.local/bin:/bin:/usr/bin:/usr/local/bin

如果没有匹配:

export PATH=/home/yamada/.local/bin:$PATH

然后保存。

相关内容