Home > Topics > Pagoda Panel > How to solve the problem that Pagoda cannot be run after installing python3

How to solve the problem that Pagoda cannot be run after installing python3

藏色散人
Release: 2020-12-07 13:51:27
forward
3807 people have browsed it

The following tutorial column of Pagoda will introduce to you the solution to the problem that Pagoda cannot run after installing python3. I hope it will be helpful to friends in need!

How to solve the problem that Pagoda cannot be run after installing python3

Solution to Pagoda that cannot be run after installing python3

First of all, many friends in the forum said that their Linux The system needs to install python3, so Xiaoqiang is here to teach you an installation environment that can use both python3 and python2.

I originally came up with a script, but thinking about how to support so many versions, I panicked a little .

Then install a python3 first. My environment is Centos7.4 64-bit. Next time I will release an Ubuntu one. Anyway, it is almost the same for now and only supports Centos for the time being.

After installing the pagoda The gcc make environment is already installed. No more introduction here. Let’s get straight to the point

1. Download the python installation package

wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
Copy after login

2. Unzip

  tar -xzvf Python-3.6.0.tgz
Copy after login

3. Enter the path to the decompressed installation package:

  cd Python-3.6.0
Copy after login

4. Compile the installation package, specify the installation path, and execute the installation command:

Note: The prefix parameter is used to specify that Python is installed in a new directory to prevent overwriting the python installed by default on the system

./configure --prefix=/usr/local/python36   
make && make install
Copy after login

5. Establish a soft link (python3 environment variable)

ln -s /usr/local/python36/bin/python3.6 /usr/bin/python3
Copy after login

You can use python3 by running python3 directly

[root@Rserver-1 Python-3.6.0]# python3
Python 3.6.0 (default, May 25 2017, 11:39:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>>
>>>
Copy after login

If you accidentally set python3 as the default py, the solution is as follows:

wget http://103.224.251.67/install/ext/python_check.sh && sh python_check.sh
Copy after login

For more related technical articles, please visit the Pagoda Paneltutorial column!

The above is the detailed content of How to solve the problem that Pagoda cannot be run after installing python3. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:bt.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