![](/img/trans.png)
[英]Can't get PyTest to run in VSCode or terminal. No tests recognized
[英]Just installed Jupyter using Anaconda but can't run it using terminal. Says command not found
在我一生都在使用 Windows 之后,我剛剛買了我的第一台 Mac,並且一直在嘗試安裝東西。 我還是個編程初學者。
我為 Python 2.7 版本安裝了 Anaconda,然后我立即安裝了 3.7 版本。
我試着去終端並輸入 jupyter notebook 但它說:
zsh: command not found: jupyter
當我在聚光燈下搜索 jupyter notebook 並執行熱門搜索時,我能夠啟動 jupyter notebook(我認為)。
我在論壇上閱讀了很多關於這個問題的文章,看到很多人在談論我不太確定的 PATH。
我看到人們也發布了他們的which python
信息,他們的信息似乎與我的非常不同:
which python3
usr/bin/python3
which python
usr/bin/python
任何幫助,將不勝感激! 仍在學習如何設置這台 Mac。 謝謝你。
您可能想參考此鏈接https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html
3.1.2. 更改 Jupyter Notebook 啟動文件夾 (Mac OS)
啟動 Jupyter Notebook 應用程序:
單擊聚光燈,鍵入終端以打開終端窗口。 通過鍵入
cd /some_folder_name
進入啟動文件cd /some_folder_name
。jupyter notebook
以啟動 Jupyter Notebook App notebook 界面將出現在新的瀏覽器窗口或選項卡中。
據我所知,您並沒有更改到 Jupyter 的啟動目錄。
您需要將 jupyter 添加到您的路徑中。
在您的終端中,輸入以下命令:
export PATH="/PUT JUPYTER PATH HERE:$PATH"
然后試試jupyter notebook
推理:如果使用 pip install --user 安裝,則必須將用戶級 bin 目錄添加到 PATH 環境變量中才能啟動 jupyter lab
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.