python3.7.3 install @ 071's blog :: 隨意窩 Xuite日誌
    1. 沒有新回應!
  • 201905151433python3.7.3 install

    wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
    tar zxvf
    Python-3.7.3.tgz

    cd Python-3.7.3
    # 加上 --with-ssl 是為了避免執行 pip 出現 ssl相關的錯誤 (pip require TLS/SSL...) ./configure --prefix=/usr/local/python37 --enable-optimizations --with-ssl make && make install

    #fix : 出現缺少 libbffi的錯誤

    wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libffi-devel-3.0.13-18.el7.x86_64.rpm

    rpm -ivh libffi-devel-3.0.13-18.el7.x86_64.rpm

     

    ModuleNotFoundError: No module named '_ctypes'

    sudo apt-get update

    sudo apt-get upgrade

    sudo apt-get upgrade --fix-missing  

     

    sudo apt-get dist

    sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus

    sudo apt-get install build-essential libncursesw5-dev libgdbm-dev libc6-dev

    sudo apt-get install zlib1g-dev libsqlite3-dev tk-dev  

    sudo apt-get install libssl-dev openssl 

    sudo apt-get install libffi-dev  

     




    1. add path to system path (modify /etc/profile)

    export PATH=$PATH:/usr/local/python37/bin


    2. 設置默認 python
    whereis python
    rm /usr/bin/python
    ln -s /usr/bin/python /usr/local/python37/bin/python3.7

    3. modify /etc/pip 

    
    
    #from pip import main 
    # if __name__ == '__main__':
    # sys.exit(main())
    from pip import __main__
    if __name__ == '__main__':
    sys.exit(__main__._main())


    4
    . 安裝 ipython / jupyter
    sudo pip install --upgrade pip
    python -m pip install ipython jupyter

        5.  運行 jupyter notebook 在browser上進行交互式操作

    jupyter notebook
    struct , initia...|日誌首頁|raspberry : con...上一篇struct , initial value when declare it....下一篇raspberry : console goes blank after a while...
    回應