MacOS使用笔记(持续更新)

  • 2020 年 7 月 1 日
  • AI

一、基础环境配置

1.1 HomeBrew相关
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

二、工具与快捷键

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中的nautilusPWD

  • ds : dictionary for shell

  • imgcat:神器,在command line中直接显示图像

imgcat可以进一步扩展到python API:

三、MacOS踩坑集锦

  1. 安装python3.6之后,之前3.7对应的openssl版本不再适用,需要切换成更老的版本:
$ brew switch openssl 1.0.2t

参考:stack overflow

  1. Chrome浏览器硬件加速导致mac死机重启(解决:关闭chrome硬件加速)

  2. Mac Preview保存论文笔记异常
    解决:好像是需要关闭全屏阅读模式然后再多保存几次。全屏模式下保存没有效果。

四、其他使用注意事项

  1. 关于电池的保养和维护://www.feng.com/post/5819895