MacOS使用筆記(持續更新)
- 2020 年 7 月 1 日
- AI
一、基礎環境配置
1.1 HomeBrew相關
- 國內安裝homebrew://zhuanlan.zhihu.com/p/111014448
- 切換brew鏡像源:待補充(目前是用VPN裝依賴)
1.2 Python相關
- Install Python3.6並設置python3 link:
首先brew install python(否則無法brew unlink)
brew unlink python
brew install --ignore-dependencies //raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb
brew switch python 3.6.5_1
重啟terminal,打開python3發現已經換成python3.6
- pip3: 用pip3裝庫時報錯:
“pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available”
解決:重裝openssl

- 設置鏡像源:pip3 config set global.index-url //mirrors.aliyun.com/pypi/simple
二、工具與快捷鍵
2.1 常用快捷鍵
- 自帶截屏:cmd+shift+ctrl+4,參考

- 輸入法打符號:shift+option+b
- 切換到桌面:觸控屏五指分開
- 關閉當前窗口(同Win下的Alt+F4):cmd+w
2.2 CommandLine Tools
-
解壓.rar文件:
$brew install unrar,然後可以$ unrar x my_file.rar,注意中間有個參數 -
$ open .#打開當前目錄所在的訪達位置,同ubuntu中的PWD
-
ds: dictionary for shell -
imgcat:神器,在command line中直接顯示圖像

imgcat可以進一步擴展到python API:

三、MacOS踩坑集錦
- 安裝python3.6之後,之前3.7對應的openssl版本不再適用,需要切換成更老的版本:
$ brew switch openssl 1.0.2t
-
Chrome瀏覽器硬件加速導致mac死機重啟(解決:關閉chrome硬件加速)
-
Mac Preview保存論文筆記異常
解決:好像是需要關閉全屏閱讀模式然後再多保存幾次。全屏模式下保存沒有效果。
四、其他使用注意事項
- 關於電池的保養和維護://www.feng.com/post/5819895




