当前位置:网站首页>Detailed deployment of flask project

Detailed deployment of flask project

2022-04-23 17:45:00 Treasure girl's Growth Diary

hello , Nice to meet you again , Come on, study together , Your attention is welcome !https://blog.csdn.net/hanhanwanghaha It's my honor to have your attention on the way to study , Making progress together is my motivation , Come on tomorrow !

Pagoda update Python edition

Because in the pagoda Python Version is 2.6.8, Use the pagoda Python For project management, you need to Python Upgrade to 3.x, Otherwise, you will be prompted that some modules failed to download during deployment . Next, let's start :

apt install

sudo apt install python3 python3-dev

Installation dependency

installed Python3 after , By default... Will be installed Python Package manager pip. install Python3 It will become pip3 Command to download dependencies .

pip3 install gevent-websocket
pip3 install psutil
easy_install Flask_Session

Change default Python edition

Delete the default version

sudo rm /usr/bin/python

take python3 Set the version as the system default version

sudo ln -s /usr/bin/python3 /usr/bin/python

change pip edition

sudo rm /usr/bin/python
sudo ln -s /usr/bin/pip3 /usr/bin/pip

Restart the pagoda panel .

Project deployment

Flask Project package

Export project dependent packages

pip freeze >requirements.txt

The project manager deploys the project

 Insert picture description here
 Insert picture description here

Set mapping

 Insert picture description here

complete

Just visit the address just mapped .

版权声明
本文为[Treasure girl's Growth Diary]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231743049463.html