Tigge / antfs-cli

Extracts FIT files from ANT-FS based sport watches such as Garmin Forerunner 60, 405CX, 310XT, 610 and 910XT.
MIT License
312 stars 77 forks source link

Scripts need to be fixed - they may not work under virtual environment #160

Closed amitramon closed 7 years ago

amitramon commented 7 years ago

Hello @Tigge and all,

The scripts, for example 40-convert_to_tcx.py or 40-upload_to_garmin_connect.py, have #!/usr/bin/python as their firs line for invoking python.

If you run antfs-cli inside a python virtual environment this may cause the scripts not to pick the right environment. An example might help me to explain:

I installed antfs-cli and garmin_uploader inside the same python 3 virtual environment. My /usr/bin/python is python2.7. So when I run antfs-cli and it invokes the 40-upload_to_garmin_connect.py, the later run under a different python environment (and version) and thus fail to import garmin_uploader.

The way to correct this, which, IMHO, is the general correct way, is to use #!/usr/bin/env python in the scripts. This will use the correct python interpreter with the correct environment.

And thanks - this is a great tool.

--- Amit

Tigge commented 7 years ago

Hi @amitramon. Agreed, using the env shebang is more correct! Could you prepare a pull request for this? If not I'll try to get some time next week to fix this.

amitramon commented 7 years ago

Hi @Tigge , great. I've just created a pull request.