- The added line is THIS COLOR.
- The deleted line is THIS COLOR.
#contents
*Prerequisite [#f28c59cd]
-Ubuntu server installation (You cn refer [[HowToUse/UbuntuServer/14.04]])
-Python installation (You can refer [[HowToUse/Python/2.7]])
*Install&Setup [#y31c1b03]
:Step.1|
Download pyenv from Github.
$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
:Step.2|
Edit .bash_profile
export PYENV_ROOT=$HOME/.pyenv
export PATH=$PYENV_ROOT/bin:$PATH
eval "$(pyenv init -)"
:Step.3|
Load .bash_profile
$ source ~/.bash_profile
:Step.4|
Install necessary modules to compile python.
$ sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils
*HowToUse [#t3bf46e8]
**Switch the Python [#z630c5a7]
:Step.1|
Check the installed python's version
$ pyenv versions
:Step.2|
Check what modules you can install additionally.
$ pyenv install --list
:Step.3|
Install modules.
$ pyenv install 3.0.1
:Step.4|
Switch python versions for the local project.
$ pyenv local 3.0.1
Then your python should be switched to 3.0.1.
**Recompile Python [#a1349f67]
:Step.1|
Sometimes, python's process might be failed due to the lack of required library. In that case, you need to recompile the python after you install necessary module.
$ CFLAGS="-fPIC"pyenv install <version>
*Author [#bfccb43f]
S.Yatsuzuka
#back(back,center,0)