Pagoda Panel builds Python environment

Server installation python environment

Find the software store

Insert image description here

Apply search input: python

Install Python Project Manager 2.4
Turn on homepage display
Insert image description here

Return to the homepage, find the python manager and click to enter

Insert image description here

Install the corresponding python version

Insert image description here

The server can come to an end here.

Develop server-side applications locally and upload them to the server

To export dependent libraries of written python applications, you need to export requirements.txt as standard. This will be used later.

Pay attention to the red box part of the screenshot
Insert image description here

Install the pipreqs library locally

pip install pipreqs

Export dependent libraries

pipreqs ./ --encoding=utf-8

Insert image description here

Pagoda adds python project

Create a new folder pythonprojs in the www directory

Insert image description here

Add project folder

Insert image description here

Upload code

Be sure to bring the requirements.txt file with you
Insert image description here

Return to the Pagoda homepage and open the python manager to add a new project

Insert image description here

The parts in red boxes are areas that need to be changed.

Here we first shut down the daemon process
Insert image description here

Confirm and start installing the dependent libraries in requirements.txt

Download dependency interface
Insert image description here

How to start the daemon process

First enter the software store to search for supervisor and install it.

Insert image description here

After installation, you can go back to the python project and start the daemon process.

That’s how easy it is!

Guess you like

Origin blog.csdn.net/qq_39162566/article/details/131546244