Closed Cynthia0629 closed 6 years ago
@Cynthia0629 it seems like your FSLDIR environmental variable is missing a directory.
Could you try setting FSLDIR=/usr/share/fsl/5.0
and retrying?
What version of Nipype are you using? You can check in a command line
python -c "import nipype; print(nipype.__version__)"
Yes,I'm sure I did. And the result of the command line python -c "import nipype; print(nipype.version)" is 0.13.1
Okay, let's verify that your python environment isn't interfering - can you run the following the same way that you tried to run your code in your original example?
import os
from nipype.interfaces import fsl
print(os.getenv('FSLDIR'))
print(fsl.Info().version())
When I run the code in the terminal the result is that
import os from nipype.interfaces import fsl
print(os.getenv('FSLDIR')) /usr/share/fsl/5.0 print(fsl.Info().version()) 5.0.9
But when I tried it with nipype, It became that:
/home/sunny/anaconda3/bin/python /home/sunny/PycharmProjects/nipype/test_environment.py None None
@Cynthia0629 How did you run the code for your second case?
But when I tried it with nipype, It became that: /home/sunny/anaconda3/bin/python /home/sunny/PycharmProjects/nipype/test_environment.py None None
Perhaps you'll need to
export FSLDIR=/usr/share/fsl/5.0
rather than just defining it, could you try running this command in a terminal and then in the same terminal runningpython /home/sunny/PycharmProjects/nipype/test_environment.py
again?
EDIT: can you also provide the OS and version you are running this on
But when I tried it with pycharm,the name of IDE I use.It bacame none again. The OS I use is ubuntu 14.04 trusty and the IDE I use is Pycharm community 2017.1.2 I use python3 and anaconda3 also. Thank you very much for your reply!
@Cynthia0629 it seems to me this is more of a Pycharm issue than Nipype - but could you try setting your FSLDIR
environmental variable within Pycharm? Something like this
Sorry,I've tried that ,but it didn't work either.But what can be sure is that it is a Pycharm issue. And I ran it successfully with spyder.Anyway,I can try to do something with my data now. It is so kind of you. Thank you very much!
When I'm trying to run the code down here.
It cames an error like this:
By the way, when I type fsl in the terminal, I can see the FSLGUI and I can do bet with the GUI successfully. And when I type bet in the terminal It cames like this:
sunny@cynthia-PC:~$ bet
Is there anyone who can tell me what I can do to fix this? I'm really confused with it.