瀏覽代碼

fix pyenv initialisation, fixes #5798

pyenv changed the required steps to correctly initialize.
Thomas Waldmann 4 年之前
父節點
當前提交
1f85cf8756
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. 7 4
      Vagrantfile

+ 7 - 4
Vagrantfile

@@ -119,11 +119,14 @@ end
 
 def install_pyenv(boxname)
   return <<-EOF
-    curl -s -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
-    echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bash_profile
-    echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
-    echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile
     echo 'export PYTHON_CONFIGURE_OPTS="--enable-shared"' >> ~/.bash_profile
+    echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
+    echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
+    . ~/.bash_profile
+    curl -s -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
+    echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile
+    echo 'eval "$(pyenv init -)"' >> ~/.bashrc
+    echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
   EOF
 end