Aeneas and Python version

I do Python 3 development, but Aeneas has always used Python 2. So whenever I synchronized audio, I always had to make sure that my environment variables were set to make Python 2 the default Python. Otherwise the sync failed, I would have to set environment variables, then continue. That sync failure happened just recently, when I was using SAB 7.0.2.

I just installed SAB 7.1, and ran an audio sync, and right after I started it, I realized that I probably had Python 3 set as my default and expected the sync to fail, but it didn’t! I checked, and sure enough Python 3 is the default, but if I Check aeneas installation… from the Tools menu, I get the coveted “All required dependencies are met and all available Python C extensions are working”.

Is this expected? I didn’t see anything in the release notes related to this. I believe I might have Aeneas installed in my Python 3 environment (because I think I installed it there before remembering that I needed to select the Python 2 environment instead during the Aeneas installation). I would be very happy if it works on Python 3, and I don’t have to keep switching back and forth, but want to make sure nothing bad is happening.

If you are on Linux, it is using Python 3 now. Since Python 2 is not available for Ubuntu 20.04 (Focal), we had to add python3-aeneas package which is built with its dependencies on Python 3 and published it on Ubuntu 18.04 (Bionic) and Ubuntu 20.04. I made scripture-app-builder dependent on python-aeneas|python3-aeneas so that upgrades from Bionic to Focal would work.

In the release notes, it is listed as:

  • Full support in Ubuntu 20.04 LTS (Focal)
    • Aeneas is now included.

I didn’t put in the details about Python 3.

Chris

So would this change allow Aeneas to work under Python 3 on Windows now? As I said, I ran it successfully in SAB 7.1 on Windows, and it worked OK and seemed to do the right thing. (Although maybe I should look more closely at the results if there is any question…)

I don’t maintain the Mac and Windows installers. This is done by @danielbair (Thank you!). Looking at https://github.com/sillsdev/aeneas-installer/releases, they were updated to Python 3 with v1.73.0 which is the latest version that is available on https://software.sil.org/scriptureappbuilder/download/.

Chris

I think that makes sense. I seem to recall the last time I installed Aeneas, I didn’t remember that SAB required Python 2, so I installed Aeneas (1.7.3.0), and it asked me which Python environment to install into and I chose Python 3. But when I tried to synchronize audio from SAB (verison 5 or 6 or something old), it failed, and I had to install Aeneas (1.7.3.0) again and tell it to install into Python 2. So on my computer, I think I had Aeneas installed in both Python environments. Just waiting for the moment when SAB could run Aeneas with Python 3, which seems to be here now!

Well, I’m not sure it is using Python 3 in SAB v8.1. As my installation of SAB can’t synch audio now.
I recently installed software that uses Python 3, and I suspect that is what broke the SAB audio synching. When I run the “check aeneas installation…” in SAB 8.1, it gives me this:

But if I go into the “C:\aeneas-install” folder and run the “aeneas_check_setup.bat” process, it says all is OK, enjoy! But that bat file is dated 2016 and hasn’t been updated to Python 3. It is still hardwired to the old installation when I look inside it.

So, this all seems needlessly difficult, even for a somewhat savvy user like me. I really don’t want debris left all over my hard drive, and when I installed v1.7.3.0 it didn’t remove its old stuff, the PATH is getting cluttered, and it still isn’t working. (Here it is in case this is useful, my Windows is fully patched Windows 10 v2004 64-bit)

PATH=C:\Python38\Scripts;C:\Python38;C:\Program Files\SIL\FieldWorks 9;C:\Python27;C:\Python27\Scripts;C:\Program Files\Amazon Corretto\jdk1.8.0_242\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\FFmpeg\bin;C:\Program Files (x86)\eSpeak\command_line;C:\Program Files\Calibre2;C:\Program Files\Google\Google Apps Sync;C:\Program Files\Google\Google Apps Migration;C:\Program Files\dotnet;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Users\dcowa\AppData\Local\Microsoft\WindowsApps;C:\Users\dcowa\AppData\Roaming\npm

I noticed that the installer for v1.7.3.0 installed OLD stuff, like Python 2.7.13, and there were several notifications while it was installing that said it was using very old copies of stuff.

Can someone please layout a clean install for us? And please let us know what we can get rid of from the old installations that are no longer needed.

And does anybody know what I need to do RIGHT NOW to get this aeneas synch package up and running again?

Thanks to all. We are dead in the water at this point.

Well, the simple solution was to change this part:
PATH=C:\Python38\Scripts;C:\Python38;C:\Program Files\SIL\FieldWorks 9;C:\Python27;C:\Python27\Scripts;C:\Program Files\Amazon Corretto\jdk1.8.0_242\bin; …

to this:
PATH=C:\Python27\Scripts;C:\Python27;C:\Python38\Scripts;C:\Python38;C:\Program Files\SIL\FieldWorks 9;C:\Program Files\Amazon Corretto\jdk1.8.0_242\bin; …

I.e. I moved the “Python27” path specs before the “Python38” path specs.

Now the SAB check works! (What I don’t know yet is whether this breaks my other program or not!) The other thing to note is, this apparently means the aeneas installer is not installing nor using Python 3.

This seems like a very fragile approach. Wondering if there is a better more self-contained way to know that the aeneas package is installed with everything it needs, and SAB knows where it is (i.e. maybe aeneas and SAB should share explicit paths and settings, rather than throwing them into a public editable place like PATH).

(BTW, when the audio synchronizing was executed by SAB, the command dialog window never said it failed. It just did it WAY too quickly to be possible.)

@david_coward,

You could try installing Aeneas that has Python 3:

Thank you for that link, Chris. It went to the newest version. BTW, that new (2019) version is not the one listed on the SAB downloaded site, FYI in case someone wants to update their aeneas installation by using the link on that page, it won’t get them the latest version.

So I downloaded it and installed it. Yes, it does use the Python 3.7.4 version (I also have Python 3.8 on my machine. Which must have been put there by another app.)

(BTW, it seems if I wanted a clean install, I should have deleted all the folders associated with the last install. The installer itself does not clean up previous versions for us.)

So, here is the Bug. The installation passes all the tests, both inside SAB and outside (running the batch file in the “aeneas-install” folder). BUT, when I try to get an audio file to parse, SAB gives me this dialog.

And I have no clue what path to put there! Looking again at the “documentation” it says, “For Windows users, if the wizard asks, “Where have you installed aeneas?”, please follow the installation instructions in section 2 of this document.” Well section 2 says to use the installer, which I did. And everything installed properly and everything checks properly.

So, what’s going on? Anybody know what path it needs to function correctly? (There are aeneas files all over the place.) And does anybody know why SAB is unable to find the aeneas installation when it can check and verify it is all there and working? (SAB did not ask this question with the older version of aeneas (v1.73.0)

Sorry to be a bother. Hope someone can shed light on this. (I’ve tried entering several folders, but the “Aeneas Program” dialog pops up and says, “Unable to find aeneas in this folder.”

Thanks ahead of time for any help!
David

I have done some research over the past week. The next version of SAB (8.2) will have support for the builds of Aeneas that use Python 3.

Thanks! So I’m not going crazy! Good to know.
Looking forward to v8.2