Skip to content

Tractseg: DeprecationWarning: pkg_resources is deprecated as an API. #285

@Ramtilakgattu

Description

@Ramtilakgattu

Hello all,

I installed TractSeg on virtualbox Linux Ubuntu (that was downloaded as a part of Freesurfer VB installation). I am trying to test the installation by running TractSeg -i Diffusion.nii.gz --raw_diffusion_input but it doesnt run at all. Here is the message that I receive on the terminal.

"**TractSeg -i Diffusion.nii.gz --raw_diffusion_input
/home/developer/anaconda3/bin/TractSeg:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import('pkg_resources').require('TractSeg==2.9')
Creating brain mask...
Warning: An input intended to be a single 3D volume has multiple timepoints. Input will be truncated to first volume, but this functionality is deprecated and will be removed in a future release.
Creating peaks (1 of 3)...
Traceback (most recent call last):
File "/home/developer/anaconda3/bin/dwi2response", line 127, in
import mrtrix3
File "/home/developer/anaconda3/bin/mrtrix3.py", line 17, in
import imp, os, sys
ModuleNotFoundError: No module named 'imp'
Creating peaks (2 of 3)...
dwi2fod: [ERROR] Unable to open numerical data text file "tractseg_output/response.txt": No such file or directory
dwi2fod: [ERROR] CSD algorithm expects second argument to be the input response function file
Creating peaks (3 of 3)...
sh2peaks: [ERROR] cannot access file "tractseg_output/WM_FODs.nii.gz": No such file or directory
sh2peaks: [ERROR] error opening image "tractseg_output/WM_FODs.nii.gz"
Traceback (most recent call last):
File "/home/developer/anaconda3/lib/python3.12/site-packages/nibabel/loadsave.py", line 101, in load
stat_result = os.stat(filename)
^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'tractseg_output/peaks.nii.gz'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/developer/anaconda3/bin/TractSeg", line 7, in
exec(compile(f.read(), file, 'exec'))
File "/home/developer/TractSeg/bin/TractSeg", line 420, in
main()
File "/home/developer/TractSeg/bin/TractSeg", line 258, in main
data_img = nib.load(peak_path)
^^^^^^^^^^^^^^^^^^^
File "/home/developer/anaconda3/lib/python3.12/site-packages/nibabel/loadsave.py", line 103, in load
raise FileNotFoundError(f"No such file or no access: '{filename}'")
FileNotFoundError: No such file or no access: 'tractseg_output/peaks.nii.gz'**

Can someone help me in resolving the issue,

I tried installing with -e option but that didnt solve the problem.

Thanks

Regards
Tilak

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions