
我正在使用 Jupyter 網站上的命令,
pip3 install jupyter
但我收到錯誤:
File "<stdin>", line 1
pip3 install jupyter
^
SyntaxError: invalid syntax
我嘗試了許多不同的命令,它們都會產生相同的錯誤。我不願意安裝 Anaconda,因為我的電腦上已經安裝了 python。
答案1
這些命令與我在他們的網站上找到的命令不同:這是我發現的:如果安裝了 Python 3:
python3 -m pip install --upgrade pip
python3 -m pip install jupyter
對於Python 2:
python -m pip install --upgrade pip
python -m pip install jupyter
希望這可以幫助。
答案2
所以,我找到了解決方案。我需要將 pip 加入我的 PATH 環境變數。我添加了python,但我還需要添加pip所在的目錄。