Python Versioning Issues? Empty Control Net in 3.6.x, ValueErrors in 3.7.x
Created by: astrostu
I've re-installed Anaconda and ISIS3 and PLIO from scratch a few times over the last several hours trying to track this down and finally think I've at least figured out enough to identify the problem(s). (Please note, I'm very new to Anaconda.)
I'm on macOS, and I installed Anaconda for Python 3.7.x. It installs. I then follow the instructions for installing an ISIS3 environment, with conda create -n isis3 python=3.6. Activate that environment. Install ISIS3. Install PLIO. Bring up a Python line (just type in "python") and then follow the PLIO example to import various packages, and then read in my control network with df = io_controlnetwork.from_isis("test.net"). It is done instantly, then I type "df" and it says "Empty IsisControlNetwork" and then lists the columns. Note when doing this, it says the Python version is 3.6.7 (if I did not install PLIO, the version is 3.6.0 after the ISIS3 install, while if I start it using "python3" it's v. 3.6.8).
In contrast, if in the above paragraph I do NOT activate the isis3 environment but stick with base, install PLIO, bring up Python, and do the exact same thing, it takes several seconds and then when I type "df" I get a lovely listing of all the measures in my network that I can then manipulate. I create a dictionary of all the serial numbers in the network. But then when I try to write it out ("io_controlnetwork.to_isis('test_out.net', df, serials)"), I get errors on column names. So I rename "id" to "point_id" and "type" to "point_type". Try writing out again, and this time I get a "ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()." problem. Note that when I do this, it says the Python version is 3.7.3.
Not sure what's going on there, but there appears to be a couple issues with the above, and it is entirely possible it's my ignorance of Anaconda: (1) There's a Python 3.6.x issue with PLIO where no control net is read in though the column names are created (yes, I did verify I'm in the correct directory). (2) There's a general problem where two column names that are read in are the wrong names for writing out. (3) In Python 3.7.x, there's some sort of issue with a "ValueError." That said on this last one, I can follow the example for a 5-point Apollo network and not get that error. However, I'm literally reading the network in, renaming those two columns to not get an error of wrong names, creating my serial numbers dictionary with no duplicates, and then writing the network out, and getting that error. (4) Not mentioned above, but when doing things in the order in my second paragraph, PLIO after ISIS3, PLIO removes the ISIS3 scripts/ directory, so I can no longer access ISIS3 commands and had to again run "conda install -c usgs-astrogeology isis3".
Help would be appreciated, and hopefully at least one of those errors is not my fault?