我的mac上安装了python27和python35。我为python27使用了别名python2,为python35使用了python。输入" python"在终端中,python35显示出来。 我也有Anacoda。 通过对,我应该安装pip3和jupyter笔记本。
我试图使用jupyter笔记本。 我输入了" jupyter notebook"在终端,我得到了
-bash: jupyter: command not found
我输入了python -m pip install jupyter
Requirement already satisfied: jupyter in /Users/xxv/anaconda/lib/python3.5/site-packages
然后我键入:pip3安装jupyter,根据文档 我得到了
-bash: pip3: command not found
pip install jupyter,我得到了:
"/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vv/243h_5ks0xs0cmt62rx7swlm0000gn/T/pip-build-VsnCwB/MarkupSafe/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/vv/243h_5ks0xs0cmt62rx7swlm0000gn/T/pip-Fa2r4V-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/vv/243h_5ks0xs0cmt62rx7swlm0000gn/T/pip-build-VsnCwB/MarkupSafe/
pip show pip,得到:
Name: pip
Version: 9.0.1
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: python-virtualenv@groups.google.com
License: MIT
Location: /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg
Requires:
答案 0 :(得分:0)
您的有效PIP适用于python2.7
Location: /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg
如果你有python3.5,pip就会自动出现。
尝试,
python3 -m pip install jupyter
使用python3的PIP正确安装jupyter。
考虑更改你执行 python或pip 时触发的默认python和PIP版本
您可以使用别名来执行上述操作,
alias python='/usr/bin/python3.x'
alias pip='python3 -m pip'