ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Python 설치, 개발환경 구축 (Ubuntu, macOS)
    Language/Python 2020. 11. 16. 19:32

    Python 설치, 개발환경 구축 (Ubuntu, macOS)

    Reference

    https://python-obd.readthedocs.io/en/latest/

    https://www.elmelectronics.com/help/obd/software/#Android

    맥(OSX)에서 파이썬(Python) 개발환경 구축하기http://knot.tistory.com/102


    Ubuntu

    1. Python 설치 확인

    $ python -v

    2. Python/PIP 설치

    $ sudo apt-get update
    
    $ sudo apt-get dist-upgrade
    
    $ sudo apt-get autoremove
    
    $ sudo apt-get install python3
    
    $ sudo apt-get install python3-pip
    
    $ sudo pip3 install --upgrade pip

    macOS

    1. Python 설치 확인

    $ python -v
    
    Python 2.7.10 (default, Aug 17 2018, 17:41:52)

    2. PIP 설치

    $ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    
    $ python get-pip.py

    3. Homebrew 설치

    $ /usr/bin/ruby -e "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/master/install)](https://raw.githubusercontent.com/Homebrew/install/master/install))"

    4. Homebrew로 Python 3.7 설치

    $ brew install python3

    5. /usr/local/Cellar/ 아래 설치된 것 확인, 실행파일의 symlink들 /usr/local/bin 아래 만들어짐

    $ ls -al python\*
    
    lrwxr-xr-x 1 mios admin 34 Dec 11 09:41 python3 -> ../Cellar/python/3.7.1/bin/python3
    
    lrwxr-xr-x 1 mios admin 41 Dec 11 09:41 python3-config -> ../Cellar/python/3.7.1/bin/python3-config
    
    lrwxr-xr-x 1 mios admin 36 Dec 11 09:41 python3.7 -> ../Cellar/python/3.7.1/bin/python3.7
    
    lrwxr-xr-x 1 mios admin 43 Dec 11 09:41 python3.7-config -> ../Cellar/python/3.7.1/bin/python3.7-config
    
    lrwxr-xr-x 1 mios admin 37 Dec 11 09:41 python3.7m -> ../Cellar/python/3.7.1/bin/python3.7m
    
    lrwxr-xr-x 1 mios admin 44 Dec 11 09:41 python3.7m-config -> ../Cellar/python/3.7.1/bin/python3.7m-config
    
    $ ls -al /usr/local/Cellar/python
    
    total 0
    
    drwxr-xr-x 3 mios staff 102 Dec 11 09:41 .
    
    drwxrwxr-x 13 mios admin 442 Dec 11 09:41 ..
    
    drwxr-xr-x 13 mios staff 442 Dec 11 09:41 3.7.1
    
    $ ls -al /usr/local/Cellar/python\*
    
    total 0
    
    drwxr-xr-x 3 mios staff 102 Dec 11 09:41 .
    
    drwxrwxr-x 13 mios admin 442 Dec 11 09:41 ..
    
    drwxr-xr-x 13 mios staff 442 Dec 11 09:41 3.7.1
    
    $ cd /usr/local
    
    $ ls
    
    Caskroom Frameworks bin include opt share
    
    Cellar Homebrew etc lib sbin var
    
    macbook:local mios$ cd Cellar/
    
    $ ls
    
    gdbm mynewt-newt openssl readline sqlite xz
    
    icu4c node python smartmontools telnet
    
    $ cd python
    
    $ ls
    
    3.7.1

    6. /usr/local/bin 디렉토리를 ~/.profile 의 PATH 에 등록 -> 생략

    7. Pycharm -> preference -> system preference -> 3.7 선택

    'Language > Python' 카테고리의 다른 글

    Python Sphinx  (0) 2020.11.16
Designed by Tistory.