Want to use python3 to do some web development do not know (mainly environment deployment), solve!

I am a python3 beginner

now python3.6.5 has been installed on this machine with mac
and several programs such as web page collection running under the console have been written

the goal is to write a background management system through web, which can manage the data editing of some websites, and directly call some programs that I wrote earlier to run under the console

.

through the online framework introduction, I want to use flask, but my system deployment is really poor, want to know my needs how to deploy the environment, thank you very much!

Nov.25,2021

1. viritualenvflask:
    application.run(host="0.0.0.0", threaded=True)
2. uwsgi + nginx + docker  cloud platform

I install viritualenv under mac

$sudo pip3 install virtualenv
is shown as follows:
The directory'/ Users/tuser/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's-H flag.
The directory'/ Users/bluesxg/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's-H flag.
Collecting virtualenv
Downloading https://pypi.tuna.tsinghua.ed. (1.9MB)

100% || 1.9MB 631kB/s 

Installing collected packages: virtualenv
Successfully installed virtualenv-16.1.0
You are using pip version 9.0.3, however version 18.1 is available.
You should consider upgrading via the 'pip install-- upgrade pip' command.

is it possible that the installation was successful?

then I sudo-I switch to the root identity
and then display-sh: virtualenv: command not found when I execute the virtualenv creation command

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c5ba-2ba85.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c5ba-2ba85.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?