Ubuntu install python 3.6


if ubuntu vesion is 16.04 LTS , then you'll need to use PPA:

apt-add-repository ppa:jonathonf/python-3.6

then

sudo apt install python3.6 sudo apt install python3.6-dev
sudo apt install python3.6-venv
wget https://bootstrap.pypa.io/get-pip.py
sudo python3.6 get-pip.py


A simple safe way would be to use an alias. Place this into ~/.bashrc or ~/.bash_aliases file: 


alias python=python3
alias pip3.6=pip


so you don't need to use ln (link) do this,
but if you only want python3.6 to be default Python :

sudo ln -s /usr/bin/python3.6 /usr/local/bin/python3
sudo ln -s /usr/local/bin/pip /usr/local/bin/pip3








Note:

ln:
ln -s  {PATH}  {you want to link PATH}






https://askubuntu.com/questions/320996/how-to-make-python-program-command-execute-python-3


http://blog.codylab.com/python-pyenv-management/

 
https://stackoverflow.com/questions/2915471/install-a-python-package-into-a-different-directory-using-pip

留言

這個網誌中的熱門文章

面試 (網路搜尋的資源)

bitwise operation 面試考題