GC v3.6 snapshot builds with included Python and modules

621 views
Skip to first unread message

Ale Martinez (Please don't email or cc me)

unread,
May 18, 2020, 10:01:24 AM5/18/20
to golden-cheetah-users
From today, snapshot builds include its own Python copy with a set of pre-installed modules.

For new users it means, after a normal GC install, the included Python should be enabled and detected automatically.
For existing users you may need to enable Python in Options/Preferences leaving the Python Home empty and, on the next start, GC will detect the included Python automatically.

In both cases, preinstalled packages (sip, numpy, pandas, scipy, lmfit and plotly), should allow to use the published examples and most of the nice Python charts available on CloudDB, s.t. this HRV Trends

HRV Trends and Stress.png


without the need to learn how to install Python and required packages, a long standing request in this forum.

For chart developers contributing to CloudDB it means you can assume those modules will be available for other users to use your charts and we can move them to curated section.
Looking at the future, better performance and integration can be achieved using the new GC Charts instead of Plotly, while this is still under development, it is quite functional right now and is the basis of the new User Chart

If you already have a working Python installation, the previous way to embed a separate Python install explained in https://github.com/GoldenCheetah/GoldenCheetah/wiki/UG_Special-Topics_Working-with-Python, is still available although you may need to change your Python Path in preferences to point to it if you resorted on Python being automatically discovered, since now the priority is the included Python.
The same applies if you want to install and manage your Python modules, for the moment better to do this using an standard Python install, the included on is intended for user not willing or able to do that.


As usual, feedback is welcome.

Cheers, Ale.

TJDunnigan

unread,
May 18, 2020, 4:00:13 PM5/18/20
to golden-cheetah-users
This is really a terrific upgrade for me. Thanks Ale and other contributors.

Gerrie Delport

unread,
Jun 2, 2020, 9:54:06 AM6/2/20
to golden-cheetah-users
I downloaded the Snapshot 3.6 build yesterday. But it seem like Python is not included. 

It tried "For existing users you may need to enable Python in Options/Preferences leaving the Python Home empty and, on the next start, GC will detect the included Python automatically."

I get this after enabling Python and leaving the path empty. 

Ale Martinez (Please don't email or cc me)

unread,
Jun 2, 2020, 3:27:55 PM6/2/20
to golden-cheetah-users
El martes, 2 de junio de 2020, 10:54:06 (UTC-3), Gerrie Delport escribió:
I downloaded the Snapshot 3.6 build yesterday. But it seem like Python is not included. 

It tried "For existing users you may need to enable Python in Options/Preferences leaving the Python Home empty and, on the next start, GC will detect the included Python automatically."

I get this after enabling Python and leaving the path empty. 

Make sure it is really empty, no withespace included.

Gerrie Delport

unread,
Jun 2, 2020, 3:44:39 PM6/2/20
to golden-cheetah-users
No sorry that did not work.  I pressed delete a few times in that box. 

Ale Martinez (Please don't email or cc me)

unread,
Jun 2, 2020, 7:13:37 PM6/2/20
to golden-cheetah-users
I can reproduce the issue if there is even one space on Python Home, the last version uploaded trim whitespace, just in case...

Gerrie Delport

unread,
Jun 2, 2020, 7:39:48 PM6/2/20
to golden-cheetah-users
I installed the latest snapshot build, and sadly this idiot still cant get it to work. :(

Trim Python Home setting
    
    If it contains blanks deployed Python detection fails,
    lets make this a little more idiot-proof.

Can It be because I have a older version of Python on my PC?
Message has been deleted

Gerrie Delport

unread,
Jun 3, 2020, 5:01:51 PM6/3/20
to golden-cheetah-users
So I tried to Uninstall GC 3.6 Also uninstalled my copy of Python and reinstalled the latest snapshot build and still no luck. 

Is there a way to check if Python is installed.  

Ale Martinez (Please don't email or cc me)

unread,
Jun 3, 2020, 5:41:18 PM6/3/20
to golden-cheetah-users
El miércoles, 3 de junio de 2020, 18:01:51 (UTC-3), Gerrie Delport escribió:
So I tried to Uninstall GC 3.6 Also uninstalled my copy of Python and reinstalled the latest snapshot build and still no luck. 

Is there a way to check if Python is installed.  

Yes, open a command prompt, and change to the folder where you installed GC, for example:
cd "\Program Files\GoldenCheetah"

there you can find and run the Python interpreter and check sys.path:
C:\Program Files\GoldenCheetah>python
Python 3.7.7 ....
...
>>>import sys
>>>sys.path
...



 

Gerrie Delport

unread,
Jun 3, 2020, 7:49:06 PM6/3/20
to golden-cheetah-users
Thanks: 

So it seem like python is not installed


Microsoft Windows [Version 10.0.18363.836]
(c) 2019 Microsoft Corporation. All rights reserved.


C:\Users\Gerrie>cd C:\Users\Gerrie\AppData\Local\GoldenCheetah


C:\Users\Gerrie\AppData\Local\GoldenCheetah>python
'python' is not recognized as an internal or external command,
operable program or batch file.
Message has been deleted

Ale Martinez (Please don't email or cc me)

unread,
Jun 3, 2020, 8:11:36 PM6/3/20
to golden-cheetah-users
El miércoles, 3 de junio de 2020, 20:49:06 (UTC-3), Gerrie Delport escribió:
Thanks: 

So it seem like python is not installed


Microsoft Windows [Version 10.0.18363.836]
(c) 2019 Microsoft Corporation. All rights reserved.


C:\Users\Gerrie>cd C:\Users\Gerrie\AppData\Local\GoldenCheetah


C:\Users\Gerrie\AppData\Local\GoldenCheetah>python
'python' is not recognized as an internal or external command,
operable program or batch file.

I assume that is not the place where you installed GoldenCheetah... 

I mean the destination you selected at the installer when you installed the program, default is C:\Program Files\Golden Cheetah.

That's where GoldenCheetah.exe is located and, in the same folder, you should find python.exe.
 

HappyCheetah User

unread,
Jun 4, 2020, 7:57:05 AM6/4/20
to golden-cheetah-users
Hi, at first: thanks for the great work!

It seems to mee that I have the same issue.
Can't get Python to work with the snapshot built - gets disabled at start-up.

GS Snapshot.PNG

I am on win10, 64 bit, latest snapshot built (see image above).

I have uninstalled all other GC instances, Pyton and deleted all blanks in the path - to no avail.

Python seems to be installed though. That is what I get when I run the Python interpreter.
Microsoft Windows [Version 10.0.18363.836]
(c) 2019 Microsoft Corporation. Alle Rechte vorbehalten.

C
:\Windows\system32>cd "\Program Files\Golden Cheetah Snapshot\Golden Cheetah"

C
:\Program Files\Golden Cheetah Snapshot\Golden Cheetah>python
Python 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['C:\\Program Files\\Golden Cheetah Snapshot\\Golden Cheetah\\\ufeffLib\\site-packages', 'C:\\Program Files\\Golden Cheetah Snapshot\\Golden Cheetah\\python37.zip', 'C:\\Program Files\\Golden Cheetah Snapshot\\Golden Cheetah', 'C:\\Program Files\\Golden Cheetah Snapshot\\Golden Cheetah\\lib\\site-packages']
>>>
When I try to set this path manually, I get however the message: "Python doesn't seem to be installed"

Cheers!

Ale Martinez (Please don't email or cc me)

unread,
Jun 4, 2020, 11:50:25 AM6/4/20
to golden-cheetah-users
El jueves, 4 de junio de 2020, 8:57:05 (UTC-3), HappyCheetah User escribió:
> Hi, at first: thanks for the great work!
>
>
> It seems to mee that I have the same issue.
>
> Can't get Python to work with the snapshot built - gets disabled at start-up.
>
>
The \ufeffLib in sys.path is an error, likely because python37._pth is using utf8-BOM encoding and I need to fix this, but I don’t think this is the root cause for this issue.

Ale Martinez (Please don't email or cc me)

unread,
Jun 4, 2020, 4:25:30 PM6/4/20
to golden-cheetah-users
I've fixed the sys.path error but, since I am not sure this is the cause of the problem and I cannot reproduce the issue myself, also enabled Python embedding debugging in a console that will popup when you run this version: https://ci.appveyor.com/project/amtriathlon/goldencheetah-d5bfx/builds/33323777/artifacts

This is how it looks when it works:
[Python\PythonEmbed.cpp:101 PythonEmbed::pythonInstalled] Binary found[Python\PythonEmbed.cpp:116 PythonEmbed::pythonInstalled] Running: "C:/Program Files/Golden Cheetah/python.exe"
[Python\PythonEmbed.cpp:173 PythonEmbed::pythonInstalled] Python path:  C:/Program Files/Golden Cheetah/python37.zip;C:/Program Files/Golden Cheetah;C:/Program Files/Golden Cheetah/lib/site-packages
[Python\PythonEmbed.cpp:217 PythonEmbed::PythonEmbed] PYTHONHOME setting used: C:/Program Files/Golden Cheetah
[Python\PythonEmbed.cpp:101 PythonEmbed::pythonInstalled] Binary found[Python\PythonEmbed.cpp:116 PythonEmbed::pythonInstalled] Running: "C:/Program Files/Golden Cheetah/python.exe"
[Python\PythonEmbed.cpp:173 PythonEmbed::pythonInstalled] Python path:  C:/Program Files/Golden Cheetah/python37.zip;C:/Program Files/Golden Cheetah;C:/Program Files/Golden Cheetah/lib/site-packages
[Python\PythonEmbed.cpp:222 PythonEmbed::PythonEmbed] Python is installed: C:/Program Files/Golden Cheetah\python.exe
[Python\PythonEmbed.cpp:225 PythonEmbed::PythonEmbed] Py_SetProgramName: C:/Program Files/Golden Cheetah\python.exe
[Python\PythonEmbed.cpp:229 PythonEmbed::PythonEmbed] PyImport_AppendInittab: goldencheetah
[Python\PythonEmbed.cpp:233 PythonEmbed::PythonEmbed] PyInitializeEx(0)
[Python\PythonEmbed.cpp:244 PythonEmbed::PythonEmbed] PyImportModule('sys')
[Python\PythonEmbed.cpp:250 PythonEmbed::PythonEmbed] Add '.' to Path
[Python\PythonEmbed.cpp:255 PythonEmbed::PythonEmbed] Py_GetVersion()
Python loaded [3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)]]
[Python\PythonEmbed.cpp:281 PythonEmbed::PythonEmbed] Install stdio catcher
[Python\PythonEmbed.cpp:285 PythonEmbed::PythonEmbed] Load library.py
[Python\PythonEmbed.cpp:295 PythonEmbed::PythonEmbed] Get catcher refs
[Python\PythonEmbed.cpp:303 PythonEmbed::PythonEmbed] PyEval_InitThreads
[Python\PythonEmbed.cpp:308 PythonEmbed::PythonEmbed] Embedding completes

If Python embedding fails for you, please copy the console output (The system menu on the upper right corner of the console has an Edit menu)

Gerrie Delport

unread,
Jun 4, 2020, 4:46:01 PM6/4/20
to golden-cheetah-users
I think you fixed it. 

Gerrie Delport

unread,
Jun 4, 2020, 5:06:55 PM6/4/20
to golden-cheetah-users
I made my first Python Test chart and it works. 

Thanks a lot for all your effort and dedication to fix this. 

I really appreciate your effort. 

You guys does awesome things. 

Mick Drake

unread,
Jun 4, 2020, 5:16:00 PM6/4/20
to golden-cheetah-users
HI Ale Think its fixed... Thanks
Mick

Mark Liversedge

unread,
Jun 5, 2020, 3:21:05 AM6/5/20
to golden-cheetah-users
On Thursday, 4 June 2020 21:25:30 UTC+1, Ale Martinez (Please don't email or cc me) wrote:
I've fixed the sys.path error but, since I am not sure this is the cause of the problem and I cannot reproduce the issue myself, also enabled Python embedding debugging in a console that will popup when you run this version: https://ci.appveyor.com/project/amtriathlon/goldencheetah-d5bfx/builds/33323777/artifacts

This fixes for me also, I have python2, 3.6, 3.7 and venv and conda all installed and it uses the local install correctly.
I know how hard this was to get working and just want to say a big thank you publicly.

Mark

HappyCheetah User

unread,
Jun 5, 2020, 4:05:01 AM6/5/20
to golden-cheetah-users
This fixes it for me as well. Great stuff.

Thanks a lot!
NA

Mick Drake

unread,
Jun 6, 2020, 7:39:08 AM6/6/20
to golden-cheetah-users
Hi as stated previously this fix from Ale does sort the Python issue however I now seem to have lost some external connectivity.. I cannot access the charts on-line or download my withings data.  I am able to connect and synch my activities to dropbox.  I thought it may have been my VPN but I have switched that off and no change.
Cheers
Withings.jpg
cloud.jpg

Ale Martinez (Please don't email or cc me)

unread,
Jun 6, 2020, 9:02:47 AM6/6/20
to golden-cheetah-users
That build was intended to debug Python embedding and doesn’t have keys for external services.

The last snapshot is updated to include the Python embedding fix and it should work.

Mick Drake

unread,
Jun 6, 2020, 9:29:55 AM6/6/20
to golden-cheetah-users
Thanks Ale, all working.....

Ale Martinez (Please don't email or cc me)

unread,
Jun 6, 2020, 1:12:25 PM6/6/20
to golden-cheetah-users
Good to know, thanks to all for the feedback!

KJA

unread,
Jun 9, 2020, 3:12:52 AM6/9/20
to golden-cheetah-users
Do I need to have Python 3.7 installed on my computer?

Ale Martinez (Please don't email or cc me)

unread,
Jun 9, 2020, 3:35:40 AM6/9/20
to golden-cheetah-users
El martes, 9 de junio de 2020, 4:12:52 (UTC-3), KJA escribió:
Do I need to have Python 3.7 installed on my computer?

No, see the first post, it’s explained there. 

RoKl

unread,
Jun 9, 2020, 6:21:48 AM6/9/20
to golden-cheetah-users
I can't find a Mac OS X version of the snapshot builds. Any advice how to proceed to get them installed?

Mark Liversedge

unread,
Jun 9, 2020, 6:29:07 AM6/9/20
to golden-cheetah-users
On Tuesday, 9 June 2020 11:21:48 UTC+1, RoKl wrote:
I can't find a Mac OS X version of the snapshot builds. Any advice how to proceed to get them installed?

Did you look in the download section of the goldencheetah website?

Mark

RoKl

unread,
Jun 10, 2020, 4:10:32 AM6/10/20
to golden-cheetah-users
Yes, but this provides the developper build 3.6 (which I currently use) but not the snapshot builds, or do I mix things up?

Op dinsdag 9 juni 2020 12:29:07 UTC+2 schreef Mark Liversedge:

Mark Liversedge

unread,
Jun 10, 2020, 4:59:33 AM6/10/20
to golden-cheetah-users
On Wednesday, 10 June 2020 09:10:32 UTC+1, RoKl wrote:
Yes, but this provides the developper build 3.6 (which I currently use) but not the snapshot builds, or do I mix things up?

ugh.png

 

RoKl

unread,
Jun 10, 2020, 7:59:00 AM6/10/20
to golden-cheetah-users
Sorry, got it. 

Op woensdag 10 juni 2020 10:59:33 UTC+2 schreef Mark Liversedge:

Giovanni Angoli

unread,
Jun 13, 2020, 10:17:59 AM6/13/20
to golden-cheetah-users
Sorry if this is a double post, my first message might have not been published..

First of all thank your for your work on GC.

I'm using 3.6 Snapshot Build id: 4000 alongside with a stable 3.5 install for control.

I don't know if anything about keyboard shortcuts in train mode have changed but with 3.6 Snapshot I can't start/pause a workout
with the media play/pause shortcut. The control install with 3.5 works as expected.

Is this a bug or anything changed meanwhile?

Thank you.
Giovanni

Ale Martinez (Please don't email or cc me)

unread,
Jun 13, 2020, 10:44:11 AM6/13/20
to golden-cheetah-users
The Train bottom bar has not changed, but may be other changes have affected the keyboard focus, other shortcuts are working or neither one?
If you start the session with a mouse click the shortcuts neither work?
For this tests it can be easier to use the Robot device.

Giovanni Angoli

unread,
Jun 13, 2020, 1:03:04 PM6/13/20
to golden-cheetah-users


On Saturday, June 13, 2020 at 4:44:11 PM UTC+2, Ale Martinez (Please don't email or cc me) wrote:
The Train bottom bar has not changed, but may be other changes have affected the keyboard focus, other shortcuts are working or neither one?

I have tested the following shortcuts in a Train session:

  • Media Previous Button = Connect and Rewind Back in workout
  • Media Play/Pause Button = Play/Pause the workout
  • Media Next Button = Fast forward through workout
  • Key 0 = New lap/interval
  • Key C = Calibration
  • Key + = increase load by 5w or gradient by 0.1%
  • Key - = decrease load by 5w or gradient by 0.1%
 The only one that is not working  is the Media Play/Pause button, everything else is ok.
 I couldn't test the Media Stop button, but will do as soon as I can.

If you start the session with a mouse click the shortcuts neither?

Starting the session with a mouse click does not influence the the tests made, every shortcut that I've tested works ok except the play/pause
which is a bit puzzling.

Tim Sinclair

unread,
Jun 18, 2020, 3:23:29 PM6/18/20
to golden-cheetah-users
Hi
My 3.6 Snapshot build is working perfectly! THANK YOU
In relation to the included Python, is it safe to say that I can now uninstall my previous 3.6 version from my Windows 10 programmes? At present I have no need for any version, other than that used within GC 3.6?

Also I see the note in the GC 3.6 install directory, the  'ReadMe' file about Adding "R" Support to GoldenCheetah and the additional steps required to do that. I have  R x64 3.3.1 through R x64 3.6.1 installed, but again - as far as I can see will I will be relying on the version of R installed with the GC 3.6 Snapshot build. So would it also be ok to uninstall those, safe in the knowledge that it will have no effect on the new installation of GC?

If neccesary I can always re install Python and R in the future, should any functions of GC need them.

Maqny thanks again for making the latest version so user friendly for us less Python and R savvy users :-)!!!

Ale Martinez (Please don't email or cc me)

unread,
Jun 18, 2020, 3:28:45 PM6/18/20
to golden-cheetah-users
Python can be uninstalled, R is not included, but you can uninstall all but the last one.

Tim Sinclair

unread,
Jun 19, 2020, 11:16:51 AM6/19/20
to golden-cheetah-users
As ever- thanks Ale! :-)
Can you help me to understand, as R is no longer included in the snapshot build and, like Python has no Path set in settings, where any R charts get their modules from (if that's the right word!).
I'm just interested :-)
Many many thanks again...
I've searched for this in the release notes and forums but can't find an obvious answer (although I bet there is one)! :-)

Ale Martinez (Please don't email or cc me)

unread,
Jun 19, 2020, 11:27:41 AM6/19/20
to golden-cheetah-users
Likely because R was added to PATH when installed, you can check the version used in Help > About > Version

Tim Sinclair

unread,
Jun 19, 2020, 2:32:09 PM6/19/20
to golden-cheetah-users
Thanks :-)
Yes the path is set in the environment variable on my system. - Thganks! :-)

RoKl

unread,
Jun 20, 2020, 11:31:47 AM6/20/20
to golden-cheetah-users
I installed the build. However, I have no idea of how to get access to Python charts. I thought either a few are installed in the build or I can download them from a website. Am I wrong? If not, I wonder if someone can provide some help. Thanks anyway, for the great work.

Ale Martinez (Please don't email or cc me)

unread,
Jun 20, 2020, 11:37:42 AM6/20/20
to golden-cheetah-users
View > Download Chart allows access to CloudDB charts, there you will find several examples, the wiki has information if you want to create your own charts.

RoKl

unread,
Jun 20, 2020, 2:25:36 PM6/20/20
to golden-cheetah-users
Thanks a lot. I downloaded the first on the list, called "Altitude 3d Cesium V9 (Py). However, I got an error message "Error constructing Cesium Widget" saying that I should very whether by browser and hardware support WebGL. Moreover, "Consider trying a different web browser or updating your video drivers". No idea what that is about. Does the chart try to open a browser? And is a default browser set in GC? By the way, I use an iMac with "High Sierra" installed. 

Op zaterdag 20 juni 2020 17:37:42 UTC+2 schreef Ale Martinez (Please don't email or cc me):

RoKl

unread,
Jun 20, 2020, 2:28:57 PM6/20/20
to golden-cheetah-users
By the way, when I do the test on get.webgl.org, I see that my Safari supports WebGL. 

Op zaterdag 20 juni 2020 20:25:36 UTC+2 schreef RoKl:

RoKl

unread,
Jun 20, 2020, 2:37:00 PM6/20/20
to golden-cheetah-users
Update: I activated WebGL in Safari Preferences, but still get the same error message: "RunTimeErrors: The browser supports WebGL, but initialization failed". 

Op zaterdag 20 juni 2020 20:28:57 UTC+2 schreef RoKl:

RoKl

unread,
Jun 20, 2020, 2:40:57 PM6/20/20
to golden-cheetah-users
Update: obviously, the chart requires Cesium, but it is not available for Mac OS X.

Op zaterdag 20 juni 2020 20:37:00 UTC+2 schreef RoKl:

Ale Martinez (Please don't email or cc me)

unread,
Jun 20, 2020, 2:45:09 PM6/20/20
to golden-cheetah-users
The charts on the uncurated section are contributed by users and may require additional modules or work only under specific conditions, if they work for you or you find them  useful to customize to your needs, great, but we can’t assure they work nor support them.

RB

unread,
Jun 20, 2020, 2:54:47 PM6/20/20
to golden-cheetah-users
About webGL try the following (not sure if this also the case for MacOS)

"WebGL is not supported by your browser" in GC browser I've seen some reports it can be fixed on windows passing the command line option --ignore-gpu-blacklist, but I've not tested myself. A useful testing resource is https://webglreport.com/?v=2-

Hope this also works for you
Kind regards,
Remco

RoKl

unread,
Jun 21, 2020, 4:32:44 AM6/21/20
to golden-cheetah-users
Am I right when saying that everything I find under "View" "DownloadChart" is "uncurated"?

Op zaterdag 20 juni 2020 20:45:09 UTC+2 schreef Ale Martinez (Please don't email or cc me):

Ale Martinez (Please don't email or cc me)

unread,
Jun 21, 2020, 8:21:17 AM6/21/20
to golden-cheetah-users
El domingo, 21 de junio de 2020, 5:32:44 (UTC-3), RoKl escribió:
Am I right when saying that everything I find under "View" "DownloadChart" is "uncurated"?

No. The drop down list at the top allows to filter by curated, uncurated or all when browsing charts for download.

Giovanni Angoli

unread,
Jun 25, 2020, 6:28:33 AM6/25/20
to golden-cheetah-users
A quick heads up, I still didn't have the chance to test the Media Stop button but I can confirm that the situation with yesterday's snapshot build is still the same,
so far the Media Play/Pause button doesn't work.
--
Giovanni Angoli
Reply all
Reply to author
Forward
0 new messages