簡體   English   中英

如何在 VScode 上將腳本安裝到 Mac OS 上的路徑

[英]How do I install a script to path on Mac OS on VScode

每次我使用 pip 安裝某些東西時,我都會收到此警告消息,並且我安裝的 package 不起作用。 我不明白什么是路徑或如何修復它。 我一直看到解決方案說只需將文件更改為絕對路徑,但未能詳細說明如何執行此操作。 我看到的其他解決方案似乎只適用於 windows 並且我是 Mac 用戶。

WARNING: The scripts pip, pip3 and pip3.8 are installed in '/Users/landonbragg/Library/Python/3.8/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

例如我的問題,我已經安裝了 pytest 但每當我嘗試運行它時,我都會收到錯誤消息......

zsh: command not found: pytest

對於安裝,請嘗試使用此命令python3 -m pip install <Module>而不是pip install <Module>

您是否嘗試將此目錄添加到您的路徑中?:

/Users/landonbragg/Library/Python/3.8/bin

如果沒有,也許您想查看這篇文章如何設置 PATH 環境變量?

警告:腳本 pip、pip3 和 pip3.8 安裝在不在 PATH 上的“/Users/landonbragg/Library/Python/3.8/bin”中。 考慮將此目錄添加到 PATH

警告告訴你該怎么做。 '/Users/landonbragg/Library/Python/3.8/bin'添加到環境變量中

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM