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

Cannot use Fastsurfer with Apple M3 Pro #551

Closed
HaotingWu opened this issue Aug 3, 2024 · 12 comments
Closed

Cannot use Fastsurfer with Apple M3 Pro #551

HaotingWu opened this issue Aug 3, 2024 · 12 comments

Comments

@HaotingWu
Copy link

HaotingWu commented Aug 3, 2024

I installed FastSurfer natively on a Mac with an Apple M3 Pro, and encountered the following errors when using run_fastsurfer.sh:

截屏2024-08-03 18 25 52
@dkuegler
Copy link
Member

dkuegler commented Aug 5, 2024

Hi the issue here is, that your bash version is outdated.

Please update bash.

Please note, that we have changed the code so that future releases will be compatible with earlier versions of bash.

@m-reuter
Copy link
Member

m-reuter commented Aug 7, 2024

See also issue #528 , you may need to modify the bash shebang #! (first line ) in all bash scripts so that they actually use the manually installed bash version (which you can get e.g. via home brew). Or you can just try the dev version which we will release pretty soon.

@HaotingWu
Copy link
Author

Following your recommendation, I updated Bash to version 5.2.3, but it still isn't working
截屏2024-08-08 14 20 57

@m-reuter
Copy link
Member

m-reuter commented Aug 8, 2024

Did you update all the first lines in all bash scripts (with ending .sh) like recommended here: #528 (comment)
otherwise it will internally still use the old bash version from the system rather than the new one.

What version of FastSurfer exactly are you using anyway?

@HaotingWu
Copy link
Author

HaotingWu commented Aug 8, 2024 via email

@m-reuter
Copy link
Member

m-reuter commented Aug 8, 2024

Can you answer the questions to help us debug this:

  • what exact FastSurfer version are you using? Run: bash run_fastsurfer.sh --version , and what is written in pyproject.toml under version ?
  • how did you install bash , probably via homebrew?

And what I said in my posts above: it is not sufficient to install a newer bash in addition to the system bash. The problem is that the script will still use the system bash. This is because in each bash script the first line says: #!/bin/bashwhich points it to the system version. So you need to search for this string in all files and replace it with #!/usr/bin/env bash . You can also download our dev branch where it should work already.

@HaotingWu
Copy link
Author

HaotingWu commented Aug 8, 2024 via email

@m-reuter
Copy link
Member

m-reuter commented Aug 8, 2024

Please post the new error (I cannot see any attached images here).
Also (see above) you need to replace this string in all files.

@HaotingWu
Copy link
Author

HaotingWu commented Aug 10, 2024 via email

@m-reuter
Copy link
Member

Hi, our install notes https://deep-mi.org/FastSurfer/overview/INSTALL.html#macos
describe how to setup an install the python dependencies in a separate environment.

@dkuegler
Copy link
Member

Hi, I've made the changes you suggested by updating all occurrences of 'bin/bash' to 'opt/homebrew/bin/bash'. Similarly, I updated 'bin/python3' to 'opt/homebrew/bin/python3'. However, I’ve encountered a new issue.When I run FastSurfer, I get the following error: File "/Users/wuhaoting/Fastsurfer/FastSurferCNN/run_prediction.py", line 23, in import numpy as npModuleNotFoundError: No module named ‘numpy’ I then checked the Python environment and found that numpy is located at /Users/wuhaoting/python-envs/fastsurfer/lib/python3.10/site-packages/numpy.

This means your installation does not have numpy installed. Which makes sense, because your python is now the python in /Users/wuhaoting/python-envs/fastsurfer and not opt/homebrew/bin/python3.

At this point I would suggest you try waiting until the next version is released or switching to the dev-version of FastSurfer (the latter should probably only be used for testing as this is not a proper release).

@m-reuter
Copy link
Member

Our updates in #530 and #561 should fix the problems with bash. They will be part of our upcoming release, feel free to re-open if the same issues still occur.

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

3 participants