首页 文章

如果我安装了python35和python27,如何调用jupyter笔记本

提问于
浏览
0

我的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 install jupyter,根据我得到的文档

-bash: pip3: command not found

pip安装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:

1 回答

  • 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 or pip

    您可以使用别名来执行上述操作,

    alias python='/usr/bin/python3.x'
    alias pip='python3 -m pip'
    

相关问题