维护网站计划书,深圳低价建站,百度联盟添加网站,信用卡在哪些网站上做推广当我成功安装了Jupyter之后#xff0c;发现无法通过
jupyter notebook
开始工作。
最初的问题是
zsh command not found
该问题是个路径问题#xff0c;通过添加PATH环境变量就行了#xff0c;设置环境变量时需要注意#xff0c;zshrc和bash_profile中都可以设置…当我成功安装了Jupyter之后发现无法通过
jupyter notebook
开始工作。
最初的问题是
zsh command not found
该问题是个路径问题通过添加PATH环境变量就行了设置环境变量时需要注意zshrc和bash_profile中都可以设置二者的区别是每打开一个新的终端zshrc就会被source也就是设置的PATH被刷新一次而bash_profile每次都需要手动source。为了安全起见我的zshrc如下
vim ~/.zshrc
alias pythonpython3
source ~/.bash_profile
:wq退出保存
vim ~/.bash_profile
export PATH/usr/bin:$PATH
export PATH/Users/peisipand/Library/Python/3.8/bin:$PATH
这样的操作过后就不是command找不到的问题了而是
NotADirectoryError: [Errno 20] Not a directory: xdg-settings
貌似是一个很小众的问题网上搜不到太多相关的解决方案。
这里有一个相关的回答成功解决了我的问题。
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/webbrowser.py
找到该文件
def register_standard_browsers():global _tryorder_tryorder []if sys.platform darwin:register(MacOSX, None, MacOSXOSAScript(default))register(chrome, None, MacOSXOSAScript(chrome))register(firefox, None, MacOSXOSAScript(firefox))register(safari, None, MacOSXOSAScript(safari))# OS X can use below Unix support (but we prefer using the OS X# specific stuff)if sys.platform[:3] win:# First try to use the default Windows browserregister(windows-default, WindowsDefault)# Detect some common Windows browsers, fallback to IEiexplore os.path.join(os.environ.get(PROGRAMFILES, C:\\Program Files),Internet Explorer\\IEXPLORE.EXE)for browser in (firefox, firebird, seamonkey, mozilla,netscape, opera, iexplore):if shutil.which(browser):register(browser, None, BackgroundBrowser(browser))
将 if sys.platform[:3] win: 改成 elif sys.platform[:3] win: 就可以了。