pyenv安裝

petalinux-config出錯 覺得是pyenv的問題,後發現不是,把pyenv的安裝卸載總結以下:python

折騰了半天發覺是安裝了pyenv致使的python版本混亂,卸載後問題解決了。(卸載過程見https://github.com/pyenv/pyenv/blob/master/README.md#uninstalling-python-versionslinux

還須要將~/.bashrc中的相應代碼行註釋掉git

$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile $ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
還有pyenv init行

能正常config build。github

Installation



不一樣系統不一樣,注意
Zsh note: Modify your file instead of .
Ubuntu and Fedora note: Modify your file instead of .
Proxy note: If you use a proxy, export and too.

$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv~/.zshenv~/.bash_profile~/.bashrc~/.bash_profilehttp_proxyHTTPS_PROXY
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc $ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc

$ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
$ exec "$SHELL"


Uninstalling pyenv

simply remove the pyenv init line from your shell startup configurationshell

To completely uninstall pyenv, perform step (1) and then remove its root directory. This will delete all Python versions that were installed under $(pyenv root)/versions/ directory:bash

rm -rf $(pyenv root)
相關文章
相關標籤/搜索