


Detailed explanation of the process of installing python3 under linux
This article mainly introduces the steps to install python3 under centos7. The editor thinks it is quite good. Now I will share it with you and give it as a reference. Let’s follow the editor to take a look
Environment setup
Preparation tools:
centos7:mirror.bit.edu.cn/centos/7 /isos/x86_64/CentOS-7-x86_64-DVD-1611.iso
virtuslvox:www.virtualbox.org/wiki/Downloads
subline
secureCRT
1. After installing the virtual machine, add the image file and select minimal to minimize the installation
yum update#更新软件 yum -y install gcc kernel-devel kenel-headers make bzip2 # 安装依赖库 reboot # 重启
2. Mount the execution script
mount /dev/cdrom /mnt # 挂载光驱到 mnt 目录 cd /mnt # 进入到mnt目录 sh ./VBoxLinuxAdditions.run # 执行脚本,进行安装 reboot #重启
3. Take a snapshot for future recovery
4. Installation of python environment (install pyenv)
centos configuration
$ yum install readline readline-devel readline-static -y $ yum install openssl openssl-devel openssl-static -y $ yum install sqlite-devel -y $ yum install bzip2-devel bzip2-libs -y $ yum install patch vim git
Install python3.3/pip3
#安装python3.3 $ sudo mkdir /usr/local/python3 # 创建安装目录 $ wget --no-check-certificate https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz #下载源文件。注意:wget获取https的时候要加上:--no-check-certificate $ tar -xzvf Python-3.6.0.tgz # 解压缩包 $ cd Python-3.6.0 # 进入解压目录 #编译安装 $ sudo ./configure --prefix=/usr/local/python3 # 指定创建的目录 $ sudo make $ sudo make install #配置2个版本共存 $ sudo ln -s /usr/local/python3/bin/python3 /usr/bin/python3 #创建 python3 的软链接,这样就可以通过 python 命令使用 Python 2,python3 来使用 Python 3。 #修改默认为 Python 3 $ sudo mv python python.bak $ sudo ln -s /usr/local/python3/bin/python3 /usr/bin/python #创建 python3 的软链接 $ sudo vi /usr/bin/yum #因为 yum 使用 Python 2,因此替换为 Python 3 后可能无法正常工作,因此修改 yum 配置文件。将第一行指定的 python 版本改为 python2.7(#!/usr/bin/python 改为 #!/usr/bin/python2.7)
#源码安装 pip $ wget --no-check-certificate https://github.com/pypa/pip/archive/9.0.1.tar.gz# 下载源代码 $ tar -zvxf 9.0.1 -C pip-9.0.1 # 解压文件 $ cd pip-9.0.1 $ python3 setup.py install# 使用 Python 3 安装 $ sudo ln -s /usr/local/python3/bin/pip /usr/bin/pip3 #创建链接 $ pip install --upgrade pip # 升级 pip
Install setuptools
##
tar -xvf setuptools-1.4.2.tar.gz cd setuptools-1.4.2 python setup.py install
Detailed explanation of innodb_index_stats when importing data Error prompting table primary key conflict
3.Example details innodb_autoinc_lock_mode in mysql
4.Detailed example of adding new user permissions in MySQL##5.
Detailed example of init_connect method in mysqlThe above is the detailed content of Detailed explanation of the process of installing python3 under linux. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



When loading CentOS-7.0-1406, there are many optional versions. For ordinary users, they don’t know which one to choose. Here is a brief introduction: (1) CentOS-xxxx-LiveCD.ios and CentOS-xxxx- What is the difference between bin-DVD.iso? The former only has 700M, and the latter has 3.8G. The difference is not only in size, but the more essential difference is that CentOS-xxxx-LiveCD.ios can only be loaded into the memory and run, and cannot be installed. Only CentOS-xxx-bin-DVD1.iso can be installed on the hard disk. (2) CentOS-xxx-bin-DVD1.iso, Ce

Open the centos7 page and appear: welcome to emergency mode! afterloggingin, type "journalctl -xb" to viewsystemlogs, "systemctlreboot" toreboot, "systemctldefault" to tryagaintobootintodefaultmode. giverootpasswordformaintenance(??Control-D???): Solution: execute r

Quick Start: How to install the pandas library in Python requires specific code examples 1. Overview Python is a widely used programming language with a powerful development ecosystem that includes many practical libraries. Pandas is one of the most popular data analysis libraries. It provides efficient data structures and data analysis tools, making data processing and analysis easier. This article will introduce how to install the pandas library in Python and provide corresponding code examples. 2. Install Py

There is a lot of garbage in the tmp directory in the centos7 system. If you want to clear the garbage, how should you do it? Let’s take a look at the detailed tutorial below. To view the list of files in the tmp file directory, execute the command cdtmp/ to switch to the current file directory of tmp, and execute the ll command to view the list of files in the current directory. As shown below. Use the rm command to delete files. It should be noted that the rm command deletes files from the system forever. Therefore, it is recommended that when using the rm command, it is best to give a prompt before deleting the file. Use the command rm-i file name, wait for the user to confirm deletion (y) or skip deletion (n), and the system will perform corresponding operations. As shown below.

Set password rules for security reasons Set the number of days after which passwords expire. User must change password within days. This setting only affects created users, not existing users. If setting to an existing user, run the command "chage -M (days) (user)". PASS_MAX_DAYS60#Password expiration time PASS_MIN_DAYS3#Initial password change time PASS_MIN_LEN8#Minimum password length PASS_WARN_AGE7#Password expiration prompt time Repeat password restriction use [root@linuxprobe~]#vi/etc/pam.d/system-auth#nearline15:

1.UncaughtError:Calltoundefinedfunctionmb_strlen(); When the above error occurs, it means that we have not installed the mbstring extension; 2. Enter the PHP installation directory cd/temp001/php-7.1.0/ext/mbstring 3. Start phpize(/usr/local/bin /phpize or /usr/local/php7-abel001/bin/phpize) command to install php extension 4../configure--with-php-config=/usr/local/php7-abel

Centos7 does not have a mysql database. The default database is mariadb (a branch of mysql). You can install the mysql database manually by following the steps below. 1. Download the rpm installation file wgethttp://repo.mysql.com/mysql-community-release-el7.rpm 2. Execute rpm to install rpm-ivhmysql-community-release-el7.rpm. After the dependency resolution is completed, the following options appear: dependenciesresolved =================================

1. The compressed folder is a zip file [root@cgls]#zip-rmydata.zipmydata2. Unzip mydata.zip into the mydatabak directory [root@cgls]#unzipmydata.zip-dmydatabak3.mydata01 folder and mydata02.txt are compressed into mydata.zip[root@cgls]#zipmydata.zipmydata01mydata02.txt4. Decompress the mydata.zip file directly [root@cgls]#unzipmydata.zip5. View myd
