2016-04-07

(Python) pyenv 를 이용한 설치

  • pyenv 설치
    $ cd
    $ git clone git://github.com/yyuu/pyenv.git .pyenv
    $ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
    $ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
    $ echo 'eval "$(pyenv init -)"' >> ~/.profile
    $ source ~/.profile
  • 설치된 Python 목록 표시
    $ pyenv versions
  • 설치 가능한 Python 목록 표시
    $ pyenv install --list
  • Python 설치
    $ pyenv install -v 3.5.1
    $ pyenv rehash
  • pyenv-virtualenv 설치
    $ git clone git://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
  • 업그레이드
    $ cd ~/.pyenv
    $ git pull
    $ cd ~/.pyenv/plugins/pyenv-virtualenv
    $ git pull
  • venv27 가상환경 생성
    $ pyenv virtualenv 3.5.1 venv35
  • 가상환경 보기
    $ pyenv virtualenvs
  • 현재 디렉토리 이하에 가상환경 venv35 설정
    $ pyenv local venv35
    .python-version 파일이 생성됨.

댓글 없음:

댓글 쓰기