0
1

More than 3 years have passed since last update.

【mac】homebrewから始めるnode、pythonインストール

Posted at

個人の備忘録

基本的に先人方のqiitaを引用

Homebrewのインストール

Homebrewのインストール

[brew update]Error:homebrew-core is a shallow clone.で失敗するのを解決
エラーが出たら参照

あとはhomebrewのパッケージマネージャにNodejsやらPythonをインストールして終わり、蛇足だが続ける

Pythonのインストール

⭐︎初心者でも分かる仮想環境構築
pyenvを使うといいらしい

pyenv install 3.x.x で error: C compiler cannot create executables
最新のバージョンをインストールしようとすると出るらしい。
最新のXcode beta版をインストールしてCommand Line Toolsを最新にすれば良き。

Nodeのインストール

MacにNode.jsをインストール

nodebrew setup

で"export PATH=$HOME/.nodebrew/current/bin:$PATH"を環境PATHに設定すると
ええで!
と言われるので設定

コマンド
echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bash_profile

それか
open ~/.bash_profile

から編集してもよろしい


詰まるポイント的には、

コマンド
node -v
command not foundと怒られるが、
nodebrewのバージョンを指定。または、別バージョンを指定すれば更新される
nodebrew use v7.1.0
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1