@@ -946,3 +946,53 @@ We can use the following code to select all the data from table `lotsadata`.
946946 iquery.password = " verysecret"
947947 iquery.query = " select * from lotsadata"
948948 data = iquery.retrieve_instances()
949+
950+
951+ Recreating environments
952+ -----------------------
953+
954+ There are two approaches for recreating a python-weka-wrapper3 environment
955+ in another virtual environment or on another machine:
956+
957+ 1. `pww-packages freeze/install `
958+
959+ Using the `pww-packages ` command-line tool, you can export the currently installed
960+ Weka packages to a text file:
961+
962+ .. code-block :: bash
963+
964+ pww-packages freeze -r requirements.txt
965+
966+ If you have unofficial packages installed then it is recommended to include the URLs
967+ from which they could be obtained (according to the information stored in the packgages):
968+
969+ .. code-block :: bash
970+
971+ pww-packages freeze -u -r requirements.txt
972+
973+ In the other environment, with python-weka-wrapper3 already installed, you can then
974+ install the packages as follows:
975+
976+ .. code-block :: bash
977+
978+ pww-packages install -r requirements.txt
979+
980+
981+ 2. `pww-packages bootstrap `
982+
983+ Using the *bootstrap * approach, you can generate a Python script that will install
984+ *python-weka-wrapper3 * and all currently installed Weka packages. Any other Python
985+ libraries you need to install yourself, which you can easily do by adapting the
986+ generated script.
987+
988+ You can generate this install script from the current environment as follows:
989+
990+ .. code-block :: bash
991+
992+ pww-packages bootstrap -o pww3.py
993+
994+ In your other environment, simply run the generated script:
995+
996+ .. code-block :: bash
997+
998+ python pww3.py
0 commit comments