虚拟环境安装
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:
<pre>$ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
</pre>
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
网友评论