sacrerouge icon indicating copy to clipboard operation
sacrerouge copied to clipboard

SacreRouge can't run on Windows

Open catherine667 opened this issue 4 years ago • 3 comments

Hi,

I am trying to setup sacrerouge on Windows, but it can't recognize sacrerouge command when running ''sacrerouge setup-metric meteor". Is there a way of install each metric dependencies on Windows? Thanks very much.

catherine667 avatar Sep 02 '20 20:09 catherine667

Unfortunately I don't have access to a Windows system to be able to debug this and figure out how to fix it. Did you install the package with pip? My guess is that adding the python binary to your path during pip install sacrerouge doesn't work on Windows.

I can think of two workarounds:

  1. Clone the sacrerouge repo (instead of pip installing it), then you can run python -m sacrerouge setup-metric meteor from the root of the repository.
  2. Write your own script to run this: https://github.com/danieldeutsch/sacrerouge/blob/9d7351ac99b89d0b4cd91674b7087aea8915a5bf/sacrerouge/metrics/meteor.py#L134-L148

I think both cases unfortunately may fail because I don't know if the commands like mkdir, wget, tar work on Windows, but it's worth a try. You could alternatively manually follow the steps from that Python snippet to put the Meteor data in the right directory (DATA_ROOT defaults to .sacrerouge in your home directory).

Sorry that the code lacks good Windows support.

danieldeutsch avatar Sep 02 '20 21:09 danieldeutsch

It seems like these unix commands could be replaced with pure Python code. Would you entertain a PR to do that?

erip avatar Nov 20 '20 19:11 erip

Absolutely! The unix commands were just easier to do quickly :smile:

There are a lot of setup scripts with unix commands, but you don't need to do all of them if you are only interested in meteor, for instance. If you do edit meteor's, please change this line https://github.com/danieldeutsch/sacrerouge/blob/ee776dc598c952d9831e869da8bf1e5a595f7793/.github/workflows/unit-test.yml#L57 to key: ${{ runner.os }}-meteor-v2 so the setup-script reruns during the unit testing.

danieldeutsch avatar Nov 21 '20 02:11 danieldeutsch