2016-12-31 142 views
0

此问题已在SO上覆盖过,但推荐的修补程序无效。更改修复Mac OSX的路径:`-bash:jupyter:command not found`?

我已经安装Jupyter与pip install jupyter --upgrade和macports port install py34-jupyter但我不能通过命令行访问命令jupyter

执行pip install jupyter的情况下,该消息是:

Requirement already satisfied: jupyter in /opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages 

这也是PIP的位置。我也曾尝试

pip uninstall notebook 
pip install notebook --upgrade 

但这并没有工作。

里面/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages,我看到:

jupyter-1.0.0-py3.4.egg-info 
jupyter-1.0.0.dist-info 
jupyter.py 
jupyter_client 
jupyter_client-4.4.0-py3.4.egg-info 
jupyter_client-4.4.0.dist-info 
jupyter_console 
jupyter_console-5.0.0-py3.4.egg-info 
jupyter_console-5.0.0.dist-info 
jupyter_core 
jupyter_core-4.2.0.dist-info 
jupyter_core-4.2.1-py3.4.egg-info 

我想也许这是可能的,命令jupyter没有正确的路径所需的可执行文件,但是这似乎并不如此。

我怎样才能访问jupyter notebook

+1

安装jupyter后您的计算机上卸载jupyter,有你的Python CLI改变了吗?它应该使用IPyhton后...它将从 >>>命令 到 在文献[1]改变:命令 这将确认是否实例jupyter当被访问的IPython –

回答

1

如果您在mac上使用python,我强烈建议使用virtualenv并使用它来安装所有依赖项。安装和使用多个库时遇到问题。

pip install virtualenv virtualenvwrapper 
# Create a backup of your .bash_profile 
cp ~/.bash_profile ~/.bash_profile-org 

# Be careful with this command 
printf '\n%s\n%s\n%s' '# virtualenv' 'export WORKON_HOME=~/virtualenvs' \ 
'source /usr/local/bin/virtualenvwrapper.sh' >> ~/.bash_profile 

source ~/.bash_profile 

mkdir -p $WORKON_HOME 

mkvirtualenv your_virtual_env 

这将创建虚拟环境

deactivate 

当你走出虚拟ENV的,你可以使用pip uninstall jupyter

workon your_virtual_env 
pip install jupyter