TACTIC supports Python 3 & tips for upgrading your environment - Celton McGrath - 10-05-2019
Hey TACTICians!
We are excited to announce that TACTIC 4.7 supports Python 3. We have worked hard over the last few months to accommodate Python 3 changes, and are also grateful for some community contribution as well.
For the time being, we will support both Python 2 and 3, though we recommend upgrading to Python 3 soon.
Below is some tips on upgrading your environments to Python 3. We will be releasing more official documentation in the near future.
For now, please discuss below.
Best,
Celton
Quote:Steps to update RHEL Environment
1. Install python3
2. Replace /lib/python2.7/site-packages/tacticenv/__init__.py with latest 4.7 file /src/install/data/__init__.py
3. Copy /lib/python2.7/site-packages/tacticenv into /lib/python3.7/site-packages
4. Install updated Python 3 modules: pycryptodomex, lxml, jaraco.functools, psycopg2, pytz
* We recommend using pip and installing under python 3.
Code: python3 -m pip install pycryptodomex
5. Install updated TACTIC Python 3 service by copying src/install/service/tactic_python3 into /etc/init.d/
6. Update your TACTIC config file to use Python 3 for all services by updating <python> tag:
<services>
...
<python>python3</python>
...
</services>
7. We recommend removing all *.pyc files from your TACTIC source code since we have moved and updated certain packages into TACTIC/3rd_party/
Quote:Steps to update Windows/NT Environment
* Almost the same as RHEL environment with some adjustments
1. Install python3
2. Replace C:\Python27\Lib\site-packages\tacticenv\__init__.py with latest 4.7 file \src\install\data\__init__.py
3. Copy C:\Python27\Lib\site-packages\tacticenv into C:\Python37\Lib\site-packages
4. Install updated Python 3 modules: pycryptodomex, lxml, jaraco.windows, psycopg2, pytz
* We recommend using pip and installing under python 3.
Code: python3 -m pip install pycryptodomex
5. Install Windows service Python 3 module: pywin32
6. Update your TACTIC config file to use Python 3 for all services by updating <python> tag:
<services>
...
<python>python3</python>
...
</services>
7. We recommend removing all *.pyc files from your TACTIC source code since we have moved and updated certain packages into TACTIC/3rd_party/
8. You can now install the new Python 3 TACTIC Windows service. Remove the Python3 TACTIC Windows service and install under Python 3 using,
Code: python3 src/install/service/win32_service.py install
** At the time we tested this (Sept 2019), we had issues running the Python 3 Windows Service. The workaround required us to copy dll files from,
C:\Python37\Lib\site-packages\pywin32_system32
to
C:\Python37\Lib\site-packages\win32
The TACTIC service should run after this. If this does not solve service issues, try running TACTIC in debug mode:
Code: python3 src/install/service/win32_service.py debug
|