-
Notifications
You must be signed in to change notification settings - Fork 1
Install Python
JihunJung edited this page Oct 17, 2019
·
1 revision
Python install(Reference)
- Ubuntu 16.04 LTS에는 Default로 python2.7과 python3.5가 설치되어 있어서 이외의 버전을 사용할 경우 따로 설치가 필요 함
- Manually Installing Python
$ sudo apt update
$ sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget
$ mkdir tmp
$ cd tmp
$ wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
$ tar -xf Python-3.7.2.tar.xz
$ cd Python-3.7.2
$ ./configure --enable-optimizations
$ make -j 1
$ sudo make altinstall
$ python3.7 --version- Installing Python via PPA
$ sudo apt update
$ sudo apt install software-properties-common
$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo ap update
$ sudo ap install python 3.7- Ubuntu 16.04 LTS의 경우 기본 python으로 python2.7으로 설정되어 있음
- python version 확인
- $ python --version
- python version 확인
- 하나의 시스템에서 여러버전의 python을 사용할 수 있음
- python bin link 확인
- $ ls -la /usr/bin/python
- python bin file list 확인
- $ ls /usr/bin/ | grep python
- python version 등록
- python bin link 확인
# python2 등록
$ sudo update-alternatives --install /usr/bin/python2 python2 /usr/bin/python2.7 1
# pytnon3 등록
$ sudo update-alternatives --install /usr/bin/python2 python2 /usr/bin/python2.5 1
$ sudo update-alternatives --install /usr/bin/python2 python2 /usr/bin/python3.7 2
# system python 등록
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2
# 삭제방법
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2
# python version 설정 방법
$ sudo update-alternatives --config python
# python symbolic link
$ sudo rm /usr/bin/python
$ sudo ln -s /usr/bin/python2.7 /usr/bin/python-
HOME
- Environment Setting
- Install CUDA
- Install cuDNN
- Python Setting
- Install Python
- virtualenv setting
- Jupter setting
- DeepLearning Basic
- To do
- Object Detection
- How to use TensorFlow Object Detection API
- Remote Tensorboard Connection
- How to use pycocotools for managing dataset(Using coco format)
- TensorFlow
- To do
- Ubuntu
- User management
- SSH connect(with login message)
- File Transfer between local and remote
- ETC
- To do
- Environment Setting