homebrew

Mac配置Python环境

冷暖自知 提交于 2020-02-09 01:18:15
目录简述: 一.python简介 二.Mac下配置python开发环境 三.Python集成开发环境Pycharm 一.python简介 Python是用来编写应用程序的高级编程语言。 Python就为我们提供了 非常完善的基础代码库 ,覆盖了网络、文件、GUI、数据库、文本等大量内容,被形象地称作“内置电池(batteries included)”。 用Python开发,许多功能不必从零编写,直接使用现成的即可。 Python适合的开发项目: 网络应用,包括网站、后台服务等等; 许多日常需要的小工具,包括系统管理员需要的脚本任务等等; 另外就是把其他语言开发的程序再包装起来,方便使用。 当然,python也有缺点: python和C程序相比非常慢。 因为Python是解释型语言,你的代码在执行时会一行一行地翻译成CPU能理解的机器码,这个翻译过程非常耗时,所以很慢。 而C程序是运行前直接编译成CPU能执行的机器码,所以非常快。 二.Mac下配置python开发环境 Mac OS X系统自带python,可以在终端输入python查看版本【输入exit()即可退出】,如下: 当然,可以看出,系统自带的python2.7版本已经不推荐使用了,通俗一点说,也就是绝版了。 Python安装方法: Mac OS下安装Python主要方式有两种: Homebrew安装 Homebrew PS

MacBook安装Wget

筅森魡賤 提交于 2020-02-08 18:28:54
推荐方法:brew install wget 步骤 1、安装brew和brew-core $ git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git $ git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1 $ git clone git://mirrors.ustc.edu.cn/homebrew-cask.git//usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask --depth=1 2、修改brew repo $ cd "$(brew --repo)" $ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git $ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" $ git remote set-url origin https://mirrors.tuna.tsinghua

Mac系统安装Node

ぐ巨炮叔叔 提交于 2020-02-08 09:28:57
来源: https://www.runoob.com/nodejs/nodejs-install-setup.html Last login: Wed Dec 18 06:33:17 on console huangxiaodeMacBook-Pro:~ huangxiao$ brew install node Updating Homebrew .. . // 这里会等待非常久,大概是30,40分钟 == > Auto-updated Homebrew ! Updated 2 taps ( homebrew/core and homebrew/cask ) . == > New Formulae cargo-c gimme-aws-creds node@12 skymaker cartridge-cli gnirehtet onnxruntime terrahelp crc helm@2 php@7.3 texlab cups imgproxy postgresql@11 tio detekt kind powerline-go trader devdash krew pympress vale diesel liblouis python@3.8 xlearn docker-slim libtorch rav1e dune monolith samurai fastlane

【转】Mac下的brew

天大地大妈咪最大 提交于 2020-02-08 09:06:02
转载声明 仅作笔记使用, 原地址: https://www.jianshu.com/p/aef446b33122 一、Homebrew是什么? Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能。简单的一条指令,就可以实现包管理,而不用你关心各种依赖和文件路径的情况,十分方便快捷。 官网地址: https://brew.sh 二、Homebrew 怎么安装 ?怎么卸载 ? 1、安装 打开终端,输入以下代码,稍等片刻,输入密码,等待安装完成 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )" 2、卸载 打开终端,输入以下代码,稍等片刻,输入密码,等待卸载完成 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall )" 三、Homebrew基本使用 安装任意包 $ brew install 例如:安装python $ brew install python 卸载任意包 $ brew uninstall 示例:卸载python $ brew

How to change pip3 path after installing python with homebrew?

北战南征 提交于 2020-02-06 16:14:29
问题 I previously installed Python 3 through the official distribution but recently decided to use Homebrew. I followed this to change my Python 3 path: Homebrew not linking python correctly? This is how my python 3 path looks (which is what I want): $which python /usr/local/bin/python $python --version Python 3.7.5 However, now pip is using the official distribution but I want to change it to the Homebrew version $which pip /Library/Frameworks/Python.framework/Versions/3.6/bin/pip $pip --version

How to install build-essential on mac?

大兔子大兔子 提交于 2020-01-31 22:22:21
问题 build-essential installs fine on Debian/Ubuntu, $ apt search build-essential build-essential - Informational list of build-essential packages $ sudo apt install build-essential But does not appear to be available on brew/mac : brew install build-essential Error: No available formula with the name "build-essential" ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... How do I install build-essential on Mac? 回答1: Homebrew ( brew ) is not

git安装

扶醉桌前 提交于 2020-01-30 23:19:26
最早Git是在Linux上开发的,很长一段时间内,Git也只能在Linux和Unix系统上运行。后来,慢慢地有人把它移植到了Windows上。现在,Git可以在Linux、Unix、Mac和Windows这几大平台上正常运行了。 要使用Git,第一步当然是安装Git了。 在Linux上安装Git 首先,你可以试着输入 git ,看看系统有没有安装Git: $ git The program 'git' is currently not installed. You can install it by typing: sudo apt-get install git 像上面的命令,有很多Linux会友好地告诉你Git没有安装,还会告诉你如何安装Git。 如果你碰巧用Debian或Ubuntu Linux,通过一条 sudo apt-get install git 就可以直接完成Git的安装,非常简单。 老一点的Debian或Ubuntu Linux,要把命令改为 sudo apt-get install git-core ,因为以前有个软件也叫GIT(GNU Interactive Tools),结果Git就只能叫 git-core 了。由于Git名气实在太大,后来就把GNU Interactive Tools改成 gnuit , git-core 正式改为 git 。

Mac Homebrew指南及其出错分析

落爺英雄遲暮 提交于 2020-01-29 18:15:00
Mac Homebrew指南 安装: 出错分析: 问题描述 解决办法 常用命令: 安装: 在终端输入命令 /usr/bin/ruby -e " $( curl -fsSL https:// raw.githubusercontent.com/Homebrew/install/master/install ) " 如果遇到警告 /usr/local/bin is not in your PATH . 解决办法: 在Linux操作系统下,配置环境变量是使用如下命令: vim /etc/profile 在OSX下,我们用如下命令打开环境变量配置文件: open ~/.bash_profile 添加: export PATH=/usr/local/bin:$PATH source ~/.bash_profile 更新配置后的环境变量 出错分析: 问题描述 安装brew时遇到了如下错误: curl: ( 7 ) Failed to connect to raw.githubusercontent.com port 443: Connection refused 解决办法 使用Chrome或者Safari打开如下链接 https://raw.githubusercontent.com/Homebrew/install/master/install 按下快捷键Commond

Mac安装brew及问题解决

强颜欢笑 提交于 2020-01-26 04:39:52
1、打开终端、命令行执行: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 官方地址: https://brew.sh/index_zh-cn 2、顺利情况下 3 问题 error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: the remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1` exited with 128. Error: Failure while executing; `/usr/local/bin/brew tap homebrew/core` exited with 1. Failed during: /usr

macOS: Homebrew dylib formula all hit code-sign errors

此生再无相见时 提交于 2020-01-25 08:45:07
问题 On macOS, I used to work with dynamic libraries installed via Homebrew with issues. But with my latest setup: Mojave 10.14.6 Xcode 11.2.1 I start getting code sign problems with the libs that used to work, such as protobuf. Below is the console output when running a successfully built project: dyld: Library not loaded: /usr/local/opt/protobuf/lib/libprotobuf.22.dylib Referenced from: /path/to/myproj/_build/Debug/mam-host Reason: no suitable image found. Did find: /usr/local/opt/protobuf/lib