node python环境_Linux下虚拟环境的安装node、python

虚拟环境安装

nvm安装

nvm是linux下管理node.js版本的工具,它可以很方便的进行node版本的切换

Install & Update Script

To install or update nvm, you should run the install script. To do that, you may either download and run the script manually, or use the following cURL or Wget command:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash

Running either of the above commands downloads a script and runs it. The script clones the nvm repository to ~/.nvm, and attempts to add the source lines from the snippet below to the correct profile file (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).

export NVM_DIR="$HOME/.nvm"

[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

pyenv安装

Installation / Update / Uninstallation

Once prerequisites have been installed correctly:

Install:

$ curl https://pyenv.run | bash

pyenv.run redirects to the install script in this repository and the invocation above is equivalent to:

Restart your shell so the path changes take effect:

$ exec $SHELL

You can now begin using pyenv.

If you need, export USE_GIT_URI to use git:// instead of https:// for git clone.

Update:

$ pyenv update

Uninstall:

pyenv is installed within $PYENV_ROOT (default: ~/.pyenv). To uninstall, just remove it:

$ rm -fr ~/.pyenv

then remove these three lines from .bashrc:

export PATH="$HOME/.pyenv/bin:$PATH"

eval "$(pyenv init -)"

eval "$(pyenv virtualenv-init -)"

and finally, restart your shell:

$ exec $SHELL

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值