$ brew install node
$ npm config set registry https://registry.npm.taobao.org
- Use curl
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
- Or use wget
$ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
- Modify
~/.bashrc
(or~/.zshrc
or~/.bash_profile
), and add the following content:
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
$ pyenv local 3.7.5 # if use pyenv
$ python -m venv .venv --prompt='study-nodejs'
$ source .venv/bin/activate
$ pip install jupyterlab
$ pip install jupyter_nbextensions_configurator
$ npm install -g tslab
In virtualenv, run command:
$ tslab install [--python=python3]