MIC-DKFZ / HD-BET

MRI brain extraction tool
Apache License 2.0
255 stars 61 forks source link

Security policy error #14

Closed andersenthomas closed 2 years ago

andersenthomas commented 3 years ago

Hi,

I have succesfully installed HD-BET. However, on first run using ./hd-bet -device cpu -mode fast -tta 0 I get the following error:

import-im6.q16: attempt to perform an operation not allowed by the security policy `PS' @ error/constitute.c/IsCoderAuthorized/408.
from: can't read /var/mail/HD_BET.run
from: can't read /var/mail/HD_BET.utils
import-im6.q16: attempt to perform an operation not allowed by the security policy `PS' @ error/constitute.c/IsCoderAuthorized/408.
./hd-bet: line 8: syntax error near unexpected token `"\n########################"'
./hd-bet: line 8: `    print("\n########################")'

Has anybody encountered something like this before?

FabianIsensee commented 3 years ago

Hi, I don't know because I have never seen this before. My guess is that you installed this into system python but do not have the rights to do so. My recommendation is to use a python virtualenv or conda env. Then it should work. Best, Fabian

function2-llx commented 2 years ago

I've encountered the same issue (on Ubuntu 21.10), and this is because of the lack of shebang (i.e., something like #!/usr/bin/env python at the first line of the script). If you try python $(which hd-bet), it should work if this is the case. Similar issue: https://github.com/NoahCristino/easywifi/issues/1

UPDATE: seems the issue occurs when install from git repo, e.g., pip install git+https://github.com/MIC-DKFZ/HD-BET.git

FabianIsensee commented 2 years ago

I just accepted a PR that should fix this :-)