RosettaTechnologies / AnkiBrain

147 stars 20 forks source link

Mac OS Can't install #10

Open jyarbro1 opened 4 months ago

jyarbro1 commented 4 months ago

I'm getting the following error when trying to auto install: /Library/Application Support/Anki2/addons21/1915225457/./macos-install.sh: bad interpreter: /bin/bash^M: no such file or directory

I've also tried manually installing and didn't seem to have any errors but don't see a way to input API key.

Know how I can fix this?

RosettaTechnologies commented 4 months ago

Set the API key using the top menu item under "AnkiBrain"

On Fri, Apr 19, 2024 at 11:42 AM John Yarbro @.***> wrote:

I'm getting the following error when trying to auto install: /Library/Application Support/Anki2/addons21/1915225457/./macos-install.sh: bad interpreter: /bin/bash^M: no such file or directory

I've also tried manually installing and didn't seem to have any errors but don't see a way to input API key.

Know how I can fix this?

— Reply to this email directly, view it on GitHub https://github.com/RosettaTechnologies/AnkiBrain/issues/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEV7EV4A65EGYF4YATZ7S7TY6E3NTAVCNFSM6AAAAABGPNFDYSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TGMZRGY4DANQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jyarbro1 commented 4 months ago

I can't get to the input API key menu because AnkiBrain isn't installing correctly. Only install and switch user are displayed under "AnkiBrain"

jyarbro1 commented 4 months ago

I figured out the error. Had to remove the carriage return character from the shebang line of the script. Fixed it by using the command dos2unix macos-install.sh

eshahrabani commented 4 months ago

Can you make a pull request to fix the line endings?

On Fri, Apr 19, 2024, 2:15 PM John Yarbro @.***> wrote:

I figured out the error. Had to remove the carriage return character from the shebang line of the script. Fixed it by using the command dos2unix macos-install.sh

— Reply to this email directly, view it on GitHub https://github.com/RosettaTechnologies/AnkiBrain/issues/10#issuecomment-2067071504, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRKWGCQLLZ7VNAXBMIVM7LY6FNMFAVCNFSM6AAAAABGPNFDYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXGA3TCNJQGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

1001ruchka commented 4 months ago

Another solution: sed -i -e 's/\r$/\n/' macos-install.sh I also needed to replace a line (in macos-install.sh) for a complete installation: pip install -r ./linux_requirements.txt to pip install -r ./linux_requirements.txt --upgrade pip

Fixed file: macos-install.sh.zip

Just run command "open ." this will open current directory in Finder and replace the "macos-install.sh" file with the unpacked one.