Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install unrar on Windows? #72

Closed
adamjstewart opened this issue Jun 22, 2021 · 5 comments
Closed

How to install unrar on Windows? #72

adamjstewart opened this issue Jun 22, 2021 · 5 comments

Comments

@adamjstewart
Copy link

Disclaimer: I'm not a Windows person

I'm using rarfile in my project and using GitHub Actions to run tests on Linux/macOS/Windows. pip installs rarfile just fine, but I need an unrar command to actually use it. I've figured out how to do this for Linux/macOS using:

    - name: Install apt dependencies
      run: sudo apt-get install unrar
      if: ${{ runner.os == 'Linux' }}
    - name: Install brew dependencies
      run: brew install rar
      if: ${{ runner.os == 'macOS' }}

but I haven't yet figured out how to install unrar from the command line on Windows. Another option would be for conda to install both rarfile and unrar. I opened an issue for this at conda-forge/rarfile-feedstock#4.

@markokr
Copy link
Owner

markokr commented Aug 5, 2022

In rarfile CI, the pacman seems to work well:

https://github.com/markokr/rarfile/blob/master/.github/workflows/ci.yml#L142

Ignore the download steps there, they are not used.

@adamjstewart
Copy link
Author

Thanks, that worked! Would it be possible to add the unrar executable to the wheels available on PyPI? That would shave off 20+ lines of code from my CI script. All of our other dependencies with non-Python dependencies include them in their wheels.

@adamjstewart
Copy link
Author

Update: this didn't work for Python 3.7 for some reason...

@markokr
Copy link
Owner

markokr commented Aug 5, 2022

Including unrar would get very iffy licensing-wise, I would prefer not to go there...

Note that the msys64 PATH is first prepended, but latter appended, might be significant.

@adamjstewart
Copy link
Author

Found a way easier way to test this: microsoft/torchgeo#1266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants