Update Python and Django
Update Python and Django
Windows
1. Back up OMFLOW
Disable and back up OMFLOW. Please see the [Backup and Restore] chapter for details on the backup method.
2. Confirm the current python package
Execute command line as "system administrator"
Switch to the Python folder of omflow
List all current packages (please record the package list yourself)
Command line leaves the current directory
Change the name of the Python folder to "Python_backup"
3. Install a new version of Python
Download Python3.x (32 Bit) Windows Installer and execute
Select Customize installation custom installation path
Select the installation path
C:\PROGRA\~1\OMFLOW Server\Python
4. Install python package
For offline environment, please refer to the subsequent "Supplementary" chapter
Switch back to the Python directory using the command line
Start installing the required packages (all packages listed in Chapter 2.3)
5. Modify httpd.conf
Open C:\Program Files\OMFLOW Server\Apache24\conf\httpd.conf
, and modify the following two lines of information, change python37 and mod_wsgi.cp37 to the new version number
6. Modify customized content
python 3.7 => 3.11 Django 2.2 => 4.2
The content of this section uses the above environment as an example. For other modifications required for this version, please check the official Python or Django websites by yourself.
Open
C:\Program Files\OMFLOW Server\omflow\omcustom\urls.py
Delete the following line
Modify the following line and change all url() in the text to re_path()
Save and close the file after modifications are completed
7. Restart OMFLOW
Restart the omflow service
Linux
1. Back up OMFLOW
Please back up OMFLOW first. Please refer to the [Backup and Restore] chapter for details on the backup method.
2. Stop OMFLOW
3. Delete the python folder under the /opt/omflow folder
4. Install ubuntu package
Kit list
python 3.x *python3.x-dev
python3.x-venv *python3-pip
Installation method one: Online installation version (requires Internet connection)
Installation method two: no network environment, offline installation method, please see the supplement
Download Ubuntu package offline installation package Install Ubuntu packages offline
5. Set python 3.x as an environment variable (so that python3.x can be called with the command python3)
6. Create a virtual environment for python 3.x under the /opt/omflow folder
7. Enter the virtual environment and install the python package
python package list
wheel *django==4.2 *ldap3
mod_wsgi
openpyxl
python package used by DB
Other packages that will be used... *Online installation version (requires Internet connection)
For non-network environment and offline installation methods, please see the supplement.
Download the python suite offline installation package (.whl) Install python package offline
8. Modify the wsgi_module path in apache http.conf to a new path
Replenish:
All instructions in this chapter are based on python3.11. Please modify them for different versions.
Download Ubuntu package offline installation package
Find an Ubuntu with the same environment as OMFLOW server, and an Internet connection is required.
Kit required:
*python3.11 *python3.11-dev *python3.11-venv *python3-pip
Download instructions:
The downloaded installation package will be saved in the /var/cache/apt/archives/
directory. You can use FTP software to take it out and put it into the OMFLOW server environment.
Install Ubuntu package offline
Kit required:
*python3.11 *python3.11-dev *python3.11-venv *python3-pip
Copy the .deb
file to a directory in Ubuntu, use **/tmp/Downloads
** as an example
Ubuntu instructions:
Export a list of installed python packages from an existing environment
If you already have the package list used by the original OMFLOW, you can skip this step.
Reference: https://pip.pypa.io/en/stable/cli/pip_freeze/
Export instructions:
Use FTP software to take it out and put it in an Ubuntu environment with Internet access, as a reference for subsequent package downloads.
Download the python suite offline installation package (.whl)
Please prepare an environment with python3.11 installed so that you can download the package version suitable for python3.11. This environment must be connected to the Internet.
Download instructions:
Use FTP software to take it out and put it back into the OMFLOW server.
Supplement: mod_wsgi will get tar.gz, and the installation method is rather special. Please see offline installation of mod_wsgi.
Install python package offline
Assume that the offline installation package (.whl) of the python package is placed under this path **/opt/omflow/tmp**
Installation instructions:
Install mod_wsgi offline
Installation instructions:
Error handling
If the service cannot be started after updating OMFLOW, please restore OMFLOW according to the [Backup and Restore] chapter, and then perform the update steps again.
Last updated