点击我爱计算机视觉标星,更快获取CVML新技术


本文作者:guoweiye,腾讯 PCG 开发工程师

很多人都说 Mac 比 Windows 更适合做开发,那关键是要把 Mac 配置好,下面就来和大家分享一下如何从零开始把一台新 Mackbook 打造成开发利器。

一、基本设置

  1. 升级操作系统(macOS Mojave 10.14.3)

  2. 关闭菜单栏效果, 减少资源占用和产生的热量

系统偏好设置/辅助功能/显示, 勾选 (减弱动态效果、减少透明度)

  1. 配置睡眠保护

系统偏好设置/安全性与隐私/通用, 勾选(进入睡眠或开始保护程序 立即 要求输入密码)

  1. 配置触发角

系统偏好设置/屏幕保护程序/触发角, 选择(右上桌面,左下启动台,右下启动屏幕保护)

二、工具安装

  1. Xcode Command Line Tools

xcode-select --install

  1. Homebrew

# 这里必须设置 代理地址,否则无法安装brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install
  1. brew cask list

  2. brew 安装常用工具

  1. brew cask 安装常用工具

  1. 其他工具

  • 下载工具 motrix

  • 截图工具 jietu

  • 看图工具 jietu

  • brew cask tools list

  • 快速查看工具 Nicer plugins for QuickLook

    brew cask install qlcolorcode qlstephen qlmarkdown quicklook-json qlimagesize webpquicklook suspicious-package quicklookase qlvideo

  • 微软的字体 Consolas

      wget -qO- https://raw.githubusercontent.com/yakumioto/YaHei-Consolas-Hybrid-1.12/master/install.sh && sudo install.sh
    
  • szrz插件

  • graphviz 所用语言 dot 验证

    dot -h

三、其他配置

  1. 设置 iterm2

  • iterm2 配色官网

    iterm2 > preference > profiles > colors > Color Presets > solarized dark

2.安装 zsh,oh-my-zsh

# 安装 zsh 及 补全
brew install zsh zsh-completions# 安装 oh-my-zsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh# 编辑 /etc/shells
sudo vim /etc/shells# 添加 zsh
/usr/local/bin/zsh# 修改默认shell
sudo chsh -s /usr/local/bin/zsh# 将环境变量移到~/.env.sh
vim ~/.zshrc# 设置主题
ZSH_THEME=pygmalion
# 设置插件
plugins=(git colored-man colorize github jira vagrant virtualenv pip python brew osx zsh-syntax-highlighting)# ls 配色生效
unset LSCOLORS
export CLICOLOR=1
export CLICOLOR_FORCE=1# 生效
source ~/.env.sh

3. solarized 主题配色

# clone 之
git clone https://github.com/altercation/solarized# 配置 vim 主题
cd solarized/vim-colors-solarized/
mkdir -p ~/.vim/colors
cp colors/solarized.vim ~/.vim/colors/# 配置 vim
vim ~/.vimrc
syntax on
set background=dark
colorscheme solarized
set backspace=2

4. vscode 配置命令行中打开

Open the Command Palette ( ⇧⌘ P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command.

  1. vscode 插件安装

  • Chinese language pack(中文语言包)

  • markdownlint(markdown格式检查器)

  • atom one dark theme(ATOM 风格主题)

  • one dark pro(主题)

  • material theme(主题)

  • vscode-icons(图标)

  • python(vscode python扩展包)

  • go(go 扩展包)

6. vscode shell 选择,zsh

首选项/设置, 搜索 terminal.integrated.shell.osx ,设置值为 /usr/local/bin/zsh

  1. vscode python 解释器选择

⇧⌘P, 搜索 select interpreter ,选择一个 env-3.6.8

  1. vscode python lint 安装,选择 pylint 即可

  2. vscode python 自动格式化

"python.formatting.provider": "black"

  1. python 开发工具

  • jetbrains 全家桶

  • pycharm Community

  • idea Community

四、 python 环境

  1. pyenv 安装

    # 安装 pyenv 参考, http://einverne.github.io/post/2017/04/pyenv.html
    curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash# 添加环境变量
    vim ~/.zshrc
    export PATH="/.pyenv/bin:<annotation encoding="application style="font-size: inherit;line-height: 1.75;color: rgb(80, 161, 79);overflow-wrap: inherit !important;word-break: inherit !important;" span="" class="hljs-string" encoding=""application"><span class="katex-html" aria-hidden="true" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;"><span class="strut" style="height:1em;vertical-align:-0.25em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;"><span class="mord mathit" style="margin-right:0.08125em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">H<span class="mord mathit" style="margin-right:0.02778em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">O<span class="mord mathit" style="margin-right:0.10903em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">M<span class="mord mathit" style="margin-right:0.05764em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">E/.<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">p<span class="mord mathit" style="margin-right:0.03588em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">y<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">e<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">n<span class="mord mathit" style="margin-right:0.03588em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">v/<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">b<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">i<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">n<span class="mspace" style="margin-right:0.2777777777777778em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">:PATH"
    eval "¨E45E)"eval"(pyenv init -)"
    eval "</span class="mspace" style="margin-right:0.2777777777777778em;"></span class="mord mathit"></span class="mord mathit"></span class="mord mathit"></span class="mord mathit" style="margin-right:0.03588em;"></span class="mord mathit"></span class="mord mathit"></span class="mord mathit" style="margin-right:0.03588em;"></span class="mord mathit"></span class="mord mathit" style="margin-right:0.05764em;"></span class="mord mathit" style="margin-right:0.10903em;"></span class="mord mathit" style="margin-right:0.02778em;"></span class="mord mathit" style="margin-right:0.08125em;"></span class="strut" style="height:1em;vertical-align:-0.25em;"></span class="katex-html" aria-hidden="true"></annotation encoding="application><span class="katex-html" aria-hidden="true" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;"><span class="strut" style="height:1em;vertical-align:-0.25em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">(<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">p<span class="mord mathit" style="margin-right:0.03588em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">y<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">e<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">n<span class="mord mathit" style="margin-right:0.03588em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">v<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">i<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">n<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">i<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">t¨<span class="mord mathit" style="margin-right:0.05764em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">E45<span class="mord mathit" style="margin-right:0.05764em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">E)"<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">e<span class="mord mathit" style="margin-right:0.03588em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">v<span class="mord mathit" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">a<span class="mord mathit" style="margin-right:0.01968em;" style="font-size: inherit;color: inherit;line-height: 1.75;overflow-wrap: inherit !important;word-break: inherit !important;">l"(pyenv virtualenv-init -)"# 常用命令# 查看可用版本
    pyenv install -l# 安装 python2 最新版本
    pyenv install 2.7.16# 安装报错 ERROR: The Python zlib extension was not compiled. Missing the zlib? https://github.com/pyenv/pyenv/wiki/common-build-problems
    brew install readline xz# When running Mojave or higher (10.14+) you will also need to install the additional SDK headers by downloading them from Apple Developers. You can also check under /Library/Developer/CommandLineTools/Packages/ as some versions of Mac OS will have the pkg locally.
    sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /# 安装 python3 最新版本 3.7.2
    # 报错 ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
    # https://github.com/pyenv/pyenv/issues/1184#issuecomment-409320318
    CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl)" pyenv install 3.7.2# 安装 python 3.6 ,tf 支持的最新版本
    pyenv install 3.6.8# 安装 python2 最新版 2.7.16
    pyenv install 2.7.16# 创建虚拟环境
    pyenv virtualenv 3.6.4 env-3.6.4# 激活虚拟环境
    pyenv activate env-3.6.4# 退出虚拟环境
    pyenv deactivate
    </span class="mord mathit" style="margin-right:0.01968em;"></span class="mord mathit"></span class="mord mathit" style="margin-right:0.03588em;"></span class="mord mathit"></span class="mord mathit" style="margin-right:0.05764em;"></span class="mord mathit" style="margin-right:0.05764em;"></span class="mord mathit"></span class="mord mathit"></span class="mord mathit"></span class="mord mathit"></span class="mord mathit" style="margin-right:0.03588em;"></span class="mord mathit"></span class="mord mathit"></span class="mord mathit" style="margin-right:0.03588em;"></span class="mord mathit"></span class="strut" style="height:1em;vertical-align:-0.25em;"></span class="katex-html" aria-hidden="true">
  2. 创建 pip 配置文件

    # 创建 pip 配置目录
    mkdir ~/.pip# 编辑配置
    vim ~/.pip/.pip.conf# 添加以下内容
    [list]
    format=columns
    [global]
    download_cache = ~/.cache/pip
    index-url = http://mirrors.aliyun.com/pypi/simple/
    [install]
    trusted-host=mirrors.aliyun.com
    

五、数据库安装

  1. 数据库安装

  2. 通过 brew service 管理此类后台任务

    brew tap homebrew/services
    brew services start mysql
    brew services restart mysql
    brew services list
    brew services cleanup# 通过界面管理后台服务
    brew cask install launchrocket
    

六、参考

  1. 主要参考

  • awesome-mac

  • open-source-mac-os-apps

  • Best-App

  • mac-setup

  • mac-dev-setup

  • dev-setup

CV细分方向交流群

52CV已经建立多个CV专业交流群,包括:目标跟踪、目标检测、语义分割、姿态估计、人脸识别检测、医学影像处理、超分辨率、神经架构搜索、GAN、强化学习等,扫码添加CV君拉你入群,如已经为CV君其他账号好友请直接私信,

(请务必注明相关方向,比如:目标检测

喜欢在QQ交流的童鞋,可以加52CV官方QQ群:805388940。

(不会时时在线,如果没能及时通过验证还请见谅)


长按关注我爱计算机视觉

Mac 更适合做开发?从零把 Mac 打造成开发利器相关推荐

  1. 哪种语言更适合做自动化测试?

    经常有测试新手问我:Python和Java语言,哪个更适合做自动化测试?本来想简单的回答一下的,但又觉得对不起大家对小编的信任.因此,小编今天专门写了一篇文章来回答这个问题.欢迎各位大佬补充~ 1.什 ...

  2. 五位专家跟你讲讲为啥Python更适合做AI/机器学习

    摘要: 为什么Python会在这股深度学习浪潮中成为编程语言的头牌?听听大牛如何解释吧! 原文地址:http://click.aliyun.com/m/43988/ 1.Python网络编程框架Twi ...

  3. 你觉得你有那些特质让你比别人更适合做产品经理?

    面试中我们可能会被问到这样一个问题,你觉得你有哪些特质让你比别人更适合做产品经理?产品小白尤其会被问到这个问题.那针对这个问题我们该如何回答呢?今天就来和大家聊聊这个话题. 面试题分析: 面试官一是想 ...

  4. 传统到敏捷的转型中,谁更适合做Scrum Master?

    摘要:本文主要讲述的是从传统到敏捷Scrum团队转型中,对Scrum Master这一角色的分析. 本文分享自华为云社区<传统到敏捷的转型中,谁更适合做Scrum Master?>,作者: ...

  5. python和lisp学哪个好_五位专家跟你讲讲为啥Python更适合做AI/机器学习

    摘要: 为什么Python会在这股深度学习浪潮中成为编程语言的头牌?听听大牛如何解释吧! 1.Python网络编程框架Twisted的创始人Glyph Lefkowitz(glyph): 编程是一项社 ...

  6. IBM SPSS Statistics为什么更适合做大数据分析

    在这个大数据的时代,数据每时每刻都在产生.如何高效从这些数据中筛选.分析.提炼出有用的信息,成了当下世界的一个共同课题.我们对数据进行分析最重要的是得到想要的结果,这其中的过程当然是希望软件能够帮助我 ...

  7. 什么样的人更适合做产品经理?

    有句话说的好,"一千个读者,就有一千个哈姆雷特 ."什么样的人更适合做产品经理?对此,本文作者与你分享了他的看法.enjoy~ 在问答社区看到了这个问题"什么样的人更适合 ...

  8. 下列哪个适合做链栈_很多朋友在问:多层实木生态板和颗粒板哪个更适合做衣柜呢?...

    多层实木生态板和颗粒板哪个更适合做衣柜呢?这是很多消费者非常关心的问题,济南定制家具为你解答. 考虑到衣柜一般是家庭使用,所以我们一般看好衣柜的质量和环保,当消费者去板材市场选购济南定制家具板材,商家 ...

  9. 链表!比数组更适合做增删操作的数据结构

    什么是链表? 链表和数组的对比:在大多数语言中,数组的大小是固定的,从数组的起点或中间添加或删除元素的成本很高,因为需要移动元素. 链表中的每一个元素在内存中不是连续放置的,和它左右两侧元素是没有关系 ...

最新文章

  1. 构建flutter项目
  2. JavaScript的基础学习篇
  3. 找到下一个“元素节点”通用函数
  4. Spring EL方法调用实例
  5. StrUtils 单元下的公用函数目录
  6. 全国python一级考试时间_2019年北京全国计算机一级考试时间
  7. 先生,要点单吗? (HTTP协议概览)
  8. 警惕Python编程中异常处理结构可能的坑
  9. 支持HTTP2的cURL——基于Alpine的最小化Docker镜像
  10. 2021-05-22 Android 网络性能测试工具iperf详细使用方法
  11. UOS系统应用商店提示安装失败
  12. 微信文章编辑的html在哪里,微信公众号的文章编辑界面在哪里?怎么编辑排版? | 微信公众号指南...
  13. 使用video speed controller给视频加速
  14. 计算机知识与技能比赛活动总结,技能大赛总结优秀范文
  15. 【软件测试】BUG的管理
  16. 解决虚拟机突然断网问题
  17. ADP(自适应动态规划)-扩展HDP
  18. 鞋长度和欧美的标准宽度换算表
  19. [激光原理与应用-41]:《光电检测技术-8》- 白光干涉仪
  20. MFC 类层次结构图

热门文章

  1. VC2008下使用OpenSSL 1 0 0g 免编译
  2. 爬虫学习二: bs4 xpath re
  3. 699 - The Falling Leaves
  4. Javascript事件驱动编程
  5. Centos7.6环境Docker安装Oracle19c企业版
  6. php如何复制一个对象,PHP中的对象复制及__clone() 函数
  7. vnc远程无法关闭窗口_vnc远程画面不能控制,vnc远程画面控制不了是什么原因?原因详解...
  8. jparepository查询所有_jparepository 怎样自定义查询
  9. 【tool】firewall防火墙
  10. 7 补充业务_哪些情况可以补充申报?金关账册报核要申报哪些数据?