2017-03-01 22 views
0

我不知道如何使命令jupyter notebook工作:jupyter: '筆記本' 不是Jupyter命令

~   progress ✚  sudo pip install --user ipython                             01:45:27 AM 
The directory '/Users/mona/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
The directory '/Users/mona/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
Collecting ipython 
    Downloading ipython-5.3.0-py2-none-any.whl (750kB) 
    100% |████████████████████████████████| 757kB 944kB/s 
Requirement already satisfied: pygments in /Library/Python/2.7/site-packages (from ipython) 
Requirement already satisfied: pexpect; sys_platform != "win32" in /Library/Python/2.7/site-packages (from ipython) 
Requirement already satisfied: backports.shutil-get-terminal-size; python_version == "2.7" in /Library/Python/2.7/site-packages (from ipython) 
Requirement already satisfied: simplegeneric>0.8 in /Library/Python/2.7/site-packages (from ipython) 
Requirement already satisfied: traitlets>=4.2 in /Library/Python/2.7/site-packages (from ipython) 
Collecting setuptools>=18.5 (from ipython) 
    Downloading setuptools-34.3.0-py2.py3-none-any.whl (389kB) 
    100% |████████████████████████████████| 399kB 1.7MB/s 
Collecting pathlib2; python_version == "2.7" or python_version == "3.3" (from ipython) 
    Downloading pathlib2-2.2.1-py2.py3-none-any.whl 
Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /Library/Python/2.7/site-packages (from ipython) 
Requirement already satisfied: decorator in /Library/Python/2.7/site-packages (from ipython) 
Collecting pickleshare (from ipython) 
    Downloading pickleshare-0.7.4-py2.py3-none-any.whl 
Collecting appnope; sys_platform == "darwin" (from ipython) 
    Downloading appnope-0.1.0-py2.py3-none-any.whl 
Requirement already satisfied: ptyprocess>=0.5 in /Library/Python/2.7/site-packages (from pexpect; sys_platform != "win32"->ipython) 
Requirement already satisfied: enum34; python_version == "2.7" in /Library/Python/2.7/site-packages (from traitlets>=4.2->ipython) 
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from traitlets>=4.2->ipython) 
Requirement already satisfied: ipython-genutils in /Library/Python/2.7/site-packages (from traitlets>=4.2->ipython) 
Requirement already satisfied: appdirs>=1.4.0 in /Library/Python/2.7/site-packages (from setuptools>=18.5->ipython) 
Requirement already satisfied: packaging>=16.8 in /Library/Python/2.7/site-packages (from setuptools>=18.5->ipython) 
Collecting scandir; python_version < "3.5" (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython) 
    Downloading scandir-1.5.tar.gz 
Requirement already satisfied: wcwidth in /Library/Python/2.7/site-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython) 
Requirement already satisfied: pyparsing in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from packaging>=16.8->setuptools>=18.5->ipython) 
Installing collected packages: setuptools, scandir, pathlib2, pickleshare, appnope, ipython 
    Running setup.py install for scandir ... done 
Successfully installed appnope-0.1.0 ipython-5.3.0 pathlib2-2.2.1 pickleshare-0.7.4 scandir-1.5 setuptools-34.3.0 
~   progress ✚  jupyter notebook                                01:45:46 AM 
jupyter: 'notebook' is not a Jupyter command 
~   progress ✚  sudo pip install --user notebook                           ➶ 1  01:55:03 AM 
Password: 
The directory '/Users/mona/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
The directory '/Users/mona/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
Collecting notebook 
    Downloading notebook-4.4.1-py2.py3-none-any.whl (6.9MB) 
    100% |████████████████████████████████| 6.9MB 172kB/s 
Requirement already satisfied: jinja2 in /Library/Python/2.7/site-packages (from notebook) 
Requirement already satisfied: traitlets in /Library/Python/2.7/site-packages (from notebook) 
Requirement already satisfied: ipython-genutils in /Library/Python/2.7/site-packages (from notebook) 
Collecting ipykernel (from notebook) 
    Downloading ipykernel-4.5.2-py2.py3-none-any.whl (98kB) 
    100% |████████████████████████████████| 102kB 5.3MB/s 
Requirement already satisfied: nbconvert in /Library/Python/2.7/site-packages (from notebook) 
Collecting jupyter-client (from notebook) 
    Downloading jupyter_client-5.0.0-py2.py3-none-any.whl (83kB) 
    100% |████████████████████████████████| 92kB 2.8MB/s 
Requirement already satisfied: nbformat in /Library/Python/2.7/site-packages (from notebook) 
Requirement already satisfied: tornado>=4 in /Library/Python/2.7/site-packages (from notebook) 
Requirement already satisfied: jupyter-core in /Library/Python/2.7/site-packages (from notebook) 
Collecting terminado>=0.3.3; sys_platform != "win32" (from notebook) 
Requirement already satisfied: MarkupSafe in /Library/Python/2.7/site-packages (from jinja2->notebook) 
Requirement already satisfied: enum34; python_version == "2.7" in /Library/Python/2.7/site-packages (from traitlets->notebook) 
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from traitlets->notebook) 
Requirement already satisfied: decorator in /Library/Python/2.7/site-packages (from traitlets->notebook) 
Requirement already satisfied: ipython>=4.0.0 in ./Library/Python/2.7/lib/python/site-packages (from ipykernel->notebook) 
Requirement already satisfied: pygments in /Library/Python/2.7/site-packages (from nbconvert->notebook) 
Requirement already satisfied: mistune!=0.6 in /Library/Python/2.7/site-packages (from nbconvert->notebook) 
Requirement already satisfied: entrypoints in /Library/Python/2.7/site-packages (from nbconvert->notebook) 
Collecting python-dateutil>=2.1 (from jupyter-client->notebook) 
    Downloading python_dateutil-2.6.0-py2.py3-none-any.whl (194kB) 
    100% |████████████████████████████████| 194kB 3.1MB/s 
Collecting pyzmq>=13 (from jupyter-client->notebook) 
    Downloading pyzmq-16.0.2-cp27-cp27m-macosx_10_6_intel.whl (1.1MB) 
    100% |████████████████████████████████| 1.1MB 965kB/s 
Requirement already satisfied: jsonschema!=2.5.0,>=2.0 in /Library/Python/2.7/site-packages (from nbformat->notebook) 
Requirement already satisfied: backports.ssl_match_hostname in /Library/Python/2.7/site-packages (from tornado>=4->notebook) 
Requirement already satisfied: singledispatch in /Library/Python/2.7/site-packages (from tornado>=4->notebook) 
Requirement already satisfied: certifi in /Library/Python/2.7/site-packages/certifi-14.05.14-py2.7.egg (from tornado>=4->notebook) 
Requirement already satisfied: backports_abc>=0.4 in /Library/Python/2.7/site-packages (from tornado>=4->notebook) 
Requirement already satisfied: ptyprocess in /Library/Python/2.7/site-packages (from terminado>=0.3.3; sys_platform != "win32"->notebook) 
Requirement already satisfied: pexpect; sys_platform != "win32" in /Library/Python/2.7/site-packages (from ipython>=4.0.0->ipykernel->notebook) 
Requirement already satisfied: backports.shutil-get-terminal-size; python_version == "2.7" in /Library/Python/2.7/site-packages (from ipython>=4.0.0->ipykernel->notebook) 
Requirement already satisfied: simplegeneric>0.8 in /Library/Python/2.7/site-packages (from ipython>=4.0.0->ipykernel->notebook) 
Collecting setuptools>=18.5 (from ipython>=4.0.0->ipykernel->notebook) 
    Downloading setuptools-34.3.0-py2.py3-none-any.whl (389kB) 
    100% |████████████████████████████████| 399kB 1.8MB/s 
Requirement already satisfied: pathlib2; python_version == "2.7" or python_version == "3.3" in ./Library/Python/2.7/lib/python/site-packages (from ipython>=4.0.0->ipykernel->notebook) 
Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /Library/Python/2.7/site-packages (from ipython>=4.0.0->ipykernel->notebook) 
Requirement already satisfied: pickleshare in ./Library/Python/2.7/lib/python/site-packages (from ipython>=4.0.0->ipykernel->notebook) 
Requirement already satisfied: appnope; sys_platform == "darwin" in ./Library/Python/2.7/lib/python/site-packages (from ipython>=4.0.0->ipykernel->notebook) 
Requirement already satisfied: configparser>=3.5; python_version == "2.7" in /Library/Python/2.7/site-packages (from entrypoints->nbconvert->notebook) 
Requirement already satisfied: functools32; python_version == "2.7" in /Library/Python/2.7/site-packages (from jsonschema!=2.5.0,>=2.0->nbformat->notebook) 
Requirement already satisfied: appdirs>=1.4.0 in /Library/Python/2.7/site-packages (from setuptools>=18.5->ipython>=4.0.0->ipykernel->notebook) 
Requirement already satisfied: packaging>=16.8 in /Library/Python/2.7/site-packages (from setuptools>=18.5->ipython>=4.0.0->ipykernel->notebook) 
Requirement already satisfied: scandir; python_version < "3.5" in ./Library/Python/2.7/lib/python/site-packages (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython>=4.0.0->ipykernel->notebook) 
Requirement already satisfied: wcwidth in /Library/Python/2.7/site-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython>=4.0.0->ipykernel->notebook) 
Requirement already satisfied: pyparsing in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from packaging>=16.8->setuptools>=18.5->ipython>=4.0.0->ipykernel->notebook) 
Installing collected packages: python-dateutil, pyzmq, jupyter-client, ipykernel, terminado, notebook, setuptools 
Successfully installed ipykernel-4.5.2 jupyter-client-5.0.0 notebook-4.4.1 python-dateutil-2.6.0 pyzmq-16.0.2 setuptools-34.3.0 terminado-0.6 
~   progress ✚  jupyter notebook                                01:55:41 AM 
jupyter: 'notebook' is not a Jupyter command 
~   progress ✚  which jupyter                                ➶ 1  01:55:43 AM 
/usr/local/bin/jupyter 
~   progress ✚  which pip                                  01:56:36 AM 
/usr/local/bin/pip 
~   progress ✚  which python                                 01:56:39 AM 
/usr/bin/python 
~   progress ✚  pip -V                                   01:56:42 AM 
pip 9.0.1 from /Library/Python/2.7/site-packages (python 2.7) 
~   progress ✚  which ipython                                 01:56:45 AM 
~   progress ✚  

~   progress ✚  sudo pip install --user ipython-notebook                          01:59:01 AM 
Password: 
The directory '/Users/mona/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
The directory '/Users/mona/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
Collecting ipython-notebook 
    Could not find a version that satisfies the requirement ipython-notebook (from versions:) 
No matching distribution found for ipython-notebook 

我的系統信息:

~   progress ✚  uname -a                                 ➶ 1  01:58:20 AM 
Darwin Monas-MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64 

我的PIP列表:

bash-4.3$ pip list 
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning. 
alabaster (0.7.6) 
altgraph (0.10.2) 
appdirs (1.4.2) 
appnope (0.1.0) 
arff (0.9) 
Babel (2.0) 
backports-abc (0.4) 
backports.shutil-get-terminal-size (1.0.0) 
backports.ssl-match-hostname (3.5.0.1) 
bdist-mpkg (0.5.0) 
BeautifulSoup (3.2.1) 
beautifulsoup4 (4.3.2) 
binaryornot (0.2.0) 
bonjour-py (0.3) 
butterfly (2.0.1) 
catkin-pkg (0.2.9) 
certifi (14.5.14) 
click (6.2) 
config (0.3.9) 
configparser (3.5.0) 
cookiecutter (0.7.0) 
coverage (4.0a6) 
cssselect (0.9.1) 
Cython (0.19.2) 
decorator (4.0.10) 
distribute (0.7.3) 
Django (1.6) 
docutils (0.12) 
ecdsa (0.13) 
empy (3.3.2) 
entrypoints (0.2.2) 
enum34 (1.1.6) 
Flask (0.10.1) 
functools32 (3.2.3-2) 
futures (2.2.0) 
gnip-powertrack-rules (0.2.2) 
goslate (1.3.0) 
ipykernel (4.5.2) 
ipython (5.3.0) 
ipython-genutils (0.1.0) 
itsdangerous (0.24) 
Jinja2 (2.8) 
jsonschema (2.5.1) 
jupyter-client (5.0.0) 
jupyter-core (4.2.0) 
macholib (1.5.1) 
MarkupSafe (0.23) 
matplotlib (1.3.1) 
microsofttranslator (0.6) 
mistune (0.7.3) 
mock (1.3.0) 
modulegraph (0.10.4) 
nbconvert (4.2.0) 
nbformat (4.1.0) 
netifaces (0.10.4) 
nltk (2.0.4) 
nose (1.3.7) 
notebook (4.4.1) 
numpy (1.8.0rc1) 
packaging (16.8) 
pandas (0.12.0) 
paramiko (1.15.2) 
pathlib2 (2.2.1) 
pbr (1.3.0) 
pexpect (4.2.1) 
pickleshare (0.7.4) 
Pillow (2.9.0) 
pip (9.0.1) 
prettytable (0.7.2) 
prompt-toolkit (1.0.7) 
psutil (3.1.1) 
ptyprocess (0.5.1) 
py2app (0.7.3) 
py4j (0.9) 
pycrypto (2.6.1) 
pydot (1.0.28) 
pygame (1.9.2a0) 
Pygments (2.0.2) 
pygraphviz (1.3rc2) 
pyobjc-core (2.5.1) 
pyobjc-framework-Accounts (2.5.1) 
pyobjc-framework-AddressBook (2.5.1) 
pyobjc-framework-AppleScriptKit (2.5.1) 
pyobjc-framework-AppleScriptObjC (2.5.1) 
pyobjc-framework-Automator (2.5.1) 
pyobjc-framework-CFNetwork (2.5.1) 
pyobjc-framework-Cocoa (2.5.1) 
pyobjc-framework-Collaboration (2.5.1) 
pyobjc-framework-CoreData (2.5.1) 
pyobjc-framework-CoreLocation (2.5.1) 
pyobjc-framework-CoreText (2.5.1) 
pyobjc-framework-DictionaryServices (2.5.1) 
pyobjc-framework-EventKit (2.5.1) 
pyobjc-framework-ExceptionHandling (2.5.1) 
pyobjc-framework-FSEvents (2.5.1) 
pyobjc-framework-InputMethodKit (2.5.1) 
pyobjc-framework-InstallerPlugins (2.5.1) 
pyobjc-framework-InstantMessage (2.5.1) 
pyobjc-framework-LatentSemanticMapping (2.5.1) 
pyobjc-framework-LaunchServices (2.5.1) 
pyobjc-framework-Message (2.5.1) 
pyobjc-framework-OpenDirectory (2.5.1) 
pyobjc-framework-PreferencePanes (2.5.1) 
pyobjc-framework-PubSub (2.5.1) 
pyobjc-framework-QTKit (2.5.1) 
pyobjc-framework-Quartz (2.5.1) 
pyobjc-framework-ScreenSaver (2.5.1) 
pyobjc-framework-ScriptingBridge (2.5.1) 
pyobjc-framework-SearchKit (2.5.1) 
pyobjc-framework-ServiceManagement (2.5.1) 
pyobjc-framework-Social (2.5.1) 
pyobjc-framework-SyncServices (2.5.1) 
pyobjc-framework-SystemConfiguration (2.5.1) 
pyobjc-framework-WebKit (2.5.1) 
PyOpenGL (3.1.1a1) 
pyOpenSSL (0.13.1) 
pyparsing (2.0.1) 
pyqtgraph (0.9.10) 
PySDL2 (0.9.3) 
python-dateutil (1.5) 
python-igraph (0.6.5) 
pytz (2013.7) 
pyusb (1.0.0b2) 
PyYAML (3.11) 
pyzmq (16.0.2) 
requests (2.4.0) 
rosdep (0.11.2) 
rosdistro (0.4.2) 
rosinstall (0.7.5) 
rosinstall-generator (0.1.11) 
rospkg (1.0.35) 
scandir (1.5) 
scikit-learn (0.14.1) 
scipy (0.13.0b1) 
Scrapy (0.24.4) 
setuptools (1.1.6) 
simplegeneric (0.8.1) 
simplejson (3.8.1) 
singledispatch (3.4.0.3) 
six (1.4.1) 
snowballstemmer (1.2.0) 
Sphinx (1.3.1) 
sphinx-rtd-theme (0.1.8) 
terminado (0.6) 
textblob (0.8.3) 
tinydb (3.1.2) 
tornado (4.3) 
tornado-systemd (1.0.1) 
traitlets (4.3.1) 
vboxapi (1.0) 
vcstools (0.1.36) 
wcwidth (0.1.7) 
Werkzeug (0.10.4) 
wget (2.2) 
whatportis (0.6) 
wheel (0.29.0) 
wstool (0.1.6) 
xattr (0.6.4) 
zope.interface (4.1.1) 

我升級jupyter後,我得到了類似的錯誤:

bash-4.3$ sudo pip install -U jupyter --user 
The directory '/Users/mona/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
The directory '/Users/mona/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
Collecting jupyter 
    Downloading jupyter-1.0.0-py2.py3-none-any.whl 
Collecting nbconvert (from jupyter) 
    Downloading nbconvert-5.1.1-py2.py3-none-any.whl (372kB) 
    100% |████████████████████████████████| 378kB 932kB/s 
Requirement already up-to-date: notebook in ./Library/Python/2.7/lib/python/site-packages (from jupyter) 
Requirement already up-to-date: ipykernel in ./Library/Python/2.7/lib/python/site-packages (from jupyter) 
Collecting jupyter-console (from jupyter) 
    Downloading jupyter_console-5.1.0-py2.py3-none-any.whl 
Collecting ipywidgets (from jupyter) 
    Downloading ipywidgets-6.0.0-py2.py3-none-any.whl (46kB) 
    100% |████████████████████████████████| 51kB 1.3MB/s 
Collecting qtconsole (from jupyter) 
    Downloading qtconsole-4.2.1-py2.py3-none-any.whl (104kB) 
    100% |████████████████████████████████| 112kB 1.4MB/s 
Collecting jinja2 (from nbconvert->jupyter) 
    Downloading Jinja2-2.9.5-py2.py3-none-any.whl (340kB) 
    100% |████████████████████████████████| 348kB 1.3MB/s 
Collecting pygments (from nbconvert->jupyter) 
    Downloading Pygments-2.2.0-py2.py3-none-any.whl (841kB) 
    100% |████████████████████████████████| 849kB 844kB/s 
Requirement already up-to-date: mistune!=0.6 in /Library/Python/2.7/site-packages (from nbconvert->jupyter) 
Collecting traitlets>=4.2 (from nbconvert->jupyter) 
    Downloading traitlets-4.3.2-py2.py3-none-any.whl (74kB) 
    100% |████████████████████████████████| 81kB 3.0MB/s 
Collecting nbformat (from nbconvert->jupyter) 
    Downloading nbformat-4.3.0-py2.py3-none-any.whl (154kB) 
    100% |████████████████████████████████| 163kB 1.8MB/s 
Requirement already up-to-date: entrypoints>=0.2.2 in /Library/Python/2.7/site-packages (from nbconvert->jupyter) 
Collecting pandocfilters>=1.4.1 (from nbconvert->jupyter) 
    Downloading pandocfilters-1.4.1.tar.gz 
Collecting testpath (from nbconvert->jupyter) 
    Downloading testpath-0.3-py2.py3-none-any.whl (82kB) 
    100% |████████████████████████████████| 92kB 3.1MB/s 
Collecting jupyter-core (from nbconvert->jupyter) 
    Downloading jupyter_core-4.3.0-py2.py3-none-any.whl (76kB) 
    100% |████████████████████████████████| 81kB 2.9MB/s 
Collecting bleach (from nbconvert->jupyter) 
    Downloading bleach-1.5.0-py2.py3-none-any.whl 
Requirement already up-to-date: ipython-genutils in /Library/Python/2.7/site-packages (from notebook->jupyter) 
Requirement already up-to-date: jupyter-client in ./Library/Python/2.7/lib/python/site-packages (from notebook->jupyter) 
Collecting tornado>=4 (from notebook->jupyter) 
    Downloading tornado-4.4.2.tar.gz (460kB) 
    100% |████████████████████████████████| 460kB 1.6MB/s 
Requirement already up-to-date: terminado>=0.3.3; sys_platform != "win32" in ./Library/Python/2.7/lib/python/site-packages (from notebook->jupyter) 
Requirement already up-to-date: ipython>=4.0.0 in ./Library/Python/2.7/lib/python/site-packages (from ipykernel->jupyter) 
Collecting prompt-toolkit<2.0.0,>=1.0.0 (from jupyter-console->jupyter) 
    Downloading prompt_toolkit-1.0.13-py2-none-any.whl (247kB) 
    100% |████████████████████████████████| 256kB 1.1MB/s 
Collecting widgetsnbextension~=2.0.0 (from ipywidgets->jupyter) 
    Downloading widgetsnbextension-2.0.0-py2.py3-none-any.whl (1.1MB) 
    100% |████████████████████████████████| 1.1MB 859kB/s 
Requirement already up-to-date: MarkupSafe>=0.23 in /Library/Python/2.7/site-packages (from jinja2->nbconvert->jupyter) 
Requirement already up-to-date: enum34; python_version == "2.7" in /Library/Python/2.7/site-packages (from traitlets>=4.2->nbconvert->jupyter) 
Collecting six (from traitlets>=4.2->nbconvert->jupyter) 
    Downloading six-1.10.0-py2.py3-none-any.whl 
Collecting decorator (from traitlets>=4.2->nbconvert->jupyter) 
    Downloading decorator-4.0.11-py2.py3-none-any.whl 
Collecting jsonschema!=2.5.0,>=2.4 (from nbformat->nbconvert->jupyter) 
    Downloading jsonschema-2.6.0-py2.py3-none-any.whl 
Requirement already up-to-date: configparser>=3.5; python_version == "2.7" in /Library/Python/2.7/site-packages (from entrypoints>=0.2.2->nbconvert->jupyter) 
Collecting html5lib!=0.9999,!=0.99999,<0.99999999,>=0.999 (from bleach->nbconvert->jupyter) 
    Downloading html5lib-0.9999999.tar.gz (889kB) 
    100% |████████████████████████████████| 890kB 1.1MB/s 
Collecting python-dateutil>=2.1 (from jupyter-client->notebook->jupyter) 
    Downloading python_dateutil-2.6.0-py2.py3-none-any.whl (194kB) 
    100% |████████████████████████████████| 194kB 3.2MB/s 
Requirement already up-to-date: pyzmq>=13 in ./Library/Python/2.7/lib/python/site-packages (from jupyter-client->notebook->jupyter) 
Requirement already up-to-date: singledispatch in /Library/Python/2.7/site-packages (from tornado>=4->notebook->jupyter) 
Collecting certifi (from tornado>=4->notebook->jupyter) 
    Downloading certifi-2017.1.23-py2.py3-none-any.whl (382kB) 
    100% |████████████████████████████████| 389kB 1.8MB/s 
Collecting backports_abc>=0.4 (from tornado>=4->notebook->jupyter) 
    Downloading backports_abc-0.5-py2.py3-none-any.whl 
Requirement already up-to-date: ptyprocess in /Library/Python/2.7/site-packages (from terminado>=0.3.3; sys_platform != "win32"->notebook->jupyter) 
Requirement already up-to-date: pexpect; sys_platform != "win32" in /Library/Python/2.7/site-packages (from ipython>=4.0.0->ipykernel->jupyter) 
Requirement already up-to-date: backports.shutil-get-terminal-size; python_version == "2.7" in /Library/Python/2.7/site-packages (from ipython>=4.0.0->ipykernel->jupyter) 
Requirement already up-to-date: simplegeneric>0.8 in /Library/Python/2.7/site-packages (from ipython>=4.0.0->ipykernel->jupyter) 
Collecting setuptools>=18.5 (from ipython>=4.0.0->ipykernel->jupyter) 
    Downloading setuptools-34.3.0-py2.py3-none-any.whl (389kB) 
    100% |████████████████████████████████| 399kB 2.0MB/s 
Requirement already up-to-date: pathlib2; python_version == "2.7" or python_version == "3.3" in ./Library/Python/2.7/lib/python/site-packages (from ipython>=4.0.0->ipykernel->jupyter) 
Requirement already up-to-date: pickleshare in ./Library/Python/2.7/lib/python/site-packages (from ipython>=4.0.0->ipykernel->jupyter) 
Requirement already up-to-date: appnope; sys_platform == "darwin" in ./Library/Python/2.7/lib/python/site-packages (from ipython>=4.0.0->ipykernel->jupyter) 
Requirement already up-to-date: wcwidth in /Library/Python/2.7/site-packages (from prompt-toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter) 
Requirement already up-to-date: functools32; python_version == "2.7" in /Library/Python/2.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat->nbconvert->jupyter) 
Requirement already up-to-date: appdirs>=1.4.0 in /Library/Python/2.7/site-packages (from setuptools>=18.5->ipython>=4.0.0->ipykernel->jupyter) 
Requirement already up-to-date: packaging>=16.8 in /Library/Python/2.7/site-packages (from setuptools>=18.5->ipython>=4.0.0->ipykernel->jupyter) 
Requirement already up-to-date: scandir; python_version < "3.5" in ./Library/Python/2.7/lib/python/site-packages (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython>=4.0.0->ipykernel->jupyter) 
Collecting pyparsing (from packaging>=16.8->setuptools>=18.5->ipython>=4.0.0->ipykernel->jupyter) 
    Downloading pyparsing-2.1.10-py2.py3-none-any.whl (56kB) 
    100% |████████████████████████████████| 61kB 3.2MB/s 
Installing collected packages: jinja2, pygments, six, decorator, traitlets, jupyter-core, jsonschema, nbformat, pandocfilters, testpath, html5lib, bleach, nbconvert, prompt-toolkit, jupyter-console, widgetsnbextension, ipywidgets, qtconsole, jupyter, certifi, backports-abc, tornado, python-dateutil, setuptools, pyparsing 
    Running setup.py install for pandocfilters ... done 
    Running setup.py install for html5lib ... done 
    Running setup.py install for tornado ... done 
Successfully installed backports-abc-0.5 bleach-1.5.0 certifi-2017.1.23 decorator-4.0.11 html5lib-0.9999999 ipywidgets-6.0.0 jinja2-2.9.5 jsonschema-2.6.0 jupyter-1.0.0 jupyter-console-5.1.0 jupyter-core-4.3.0 nbconvert-5.1.1 nbformat-4.3.0 pandocfilters-1.4.1 prompt-toolkit-1.0.13 pygments-2.2.0 pyparsing-2.1.10 python-dateutil-2.6.0 qtconsole-4.2.1 setuptools-34.3.0 six-1.10.0 testpath-0.3 tornado-4.4.2 traitlets-4.3.2 widgetsnbextension-2.0.0 
bash-4.3$ jupyter notebook 
Error executing Jupyter command 'notebook': [Errno 2] No such file or directory 
+0

您是否嘗試過[conda](https://www.continuum.io/downloads)?這是一個Python發行版,使包管理變得更容易。 –

+0

是的,我已經使用了它,而且我在其他機器上使用過它。我打算不在這裏使用它。 –

+0

從[jupyter官方網頁](http://jupyter.org/install.html)推薦使用'conda'進行安裝。 'conda'可能是個好主意。 –

回答

1

該錯誤表示名爲jupyter-notebook的可執行文件不在您的PATH上。由於您在macOS上安裝了--user,所以腳本將在$HOME/Library/Python/2.7/bin中進行安裝,該腳本需要位於PATH上,並且不是默認情況下。如果是這樣的話,你可以添加它:

export PATH="$HOME/Library/Python/2.7/bin:$PATH" 

你可以添加到〜/ .bashrc。