安装python3.10 基于ubuntu
·
Prerequisite
sudo apt update
sudo apt install software-properties-common -y
Add custom APT repository
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
Press ENTER to confirm adding repository.
Install Python 3.10
sudo apt install python3.10 python3.10-venv python3.10-dev
python3 --version
You will see previous of Python. At the writing time Python 3.10.16
Make symbolic link (Optional)
[!CAUTION]
This may cause problem with terminal not open on Ubuntuhttps://askubuntu.com/questions/1397938/terminal-not-opening-after-changing-python-version
ls -la /usr/bin/python3
sudo rm /usr/bin/python3
sudo ln -s python3.10 /usr/bin/python3
sudo ln -s python3.10 /usr/bin/python
python3 --version
Now you will see Python 3.10.x
Install PIP for Python 3.10
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
python3.10 -m pip --version
Test with system ENV
python3.10 -m pip install ipython
Test with Virtual ENV
python3.10 -m venv venv
pip install ipython
References
https://computingforgeeks.com/how-to-install-python-on-ubuntu-linux-system/
https://gist.githubusercontent.com/rutcreate/c0041e842f858ceb455b748809763ddb/raw/cc6ac984f9eced60bc46d29099c3df64902a66a3/README.md
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐



所有评论(0)