How to install python3.6.4 to Raspberry Pi 3rd generation

(*-*)浩
Release: 2019-07-09 10:23:15
Original
4864 people have browsed it

The default version that can be installed on Raspberry Pi using sudo apt-get install is Python 3.4, but many of the new features of Python 3.6 cannot be used, and your own projects cannot be run. So it needs to be upgraded.

How to install python3.6.4 to Raspberry Pi 3rd generation

#Currently it is not possible to simply install, you can only make and compile it yourself. (Recommended learning: Python video tutorial)
We want to install Python3.6.4 on the Raspberry Pi, so we need to compile and install this version.

The method is as follows:

# 安装编译所需依赖包
sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev 
libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev

# 安装SSL依赖
sudo apt-get install libssl-dev


# 到官网下载Python3.6.4: https://www.python.org/downloads/source/
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz

# 解压
tar xf Python-3.6.4.tar.xz 

# 进入目录
cd Python-3.6.4

# 开始编译(时间漫长,需要等待,建议用&&把三句连在一起执行)
sudo  ./configure
sudo make
sudo make install

# 升级pip
sudo python3.6 -m pip install --upgrade pip
Copy after login

After installing Python3.6, it will display:

How to install python3.6.4 to Raspberry Pi 3rd generation

For more Python-related technical articles, please visit the Python Tutorial column to learn!

The above is the detailed content of How to install python3.6.4 to Raspberry Pi 3rd generation. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!