ImportError: cannot import name 'compress_streamlines' from 'dipy.tracking.streamline'
Dear Experts
I installed TracSeg and tried to run it. but could not import 'compress_streamlines' from 'dipy.tracking.streamline'. Regarding the previous similar issue (https://github.com/MIC-DKFZ/TractSeg/issues/178), dipy version 1.5.0 may cause this problem, I installed the latest version of Tractseg from pip install https://github.com/MIC-DKFZ/TractSeg/archive/master.zip.
However, I couldn't fix this problem and the following message was shown.
Traceback (most recent call last): File "/home/brain/.local/bin/TractSeg", line 20, in <module> from tractseg.libs import plot_utils File "/home/brain/.local/lib/python3.8/site-packages/tractseg/libs/plot_utils.py", line 22, in <module> from tractseg.libs import fiber_utils File "/home/brain/.local/lib/python3.8/site-packages/tractseg/libs/fiber_utils.py", line 10, in <module> from dipy.tracking.streamline import compress_streamlines as compress_streamlines_dipy ImportError: cannot import name 'compress_streamlines' from 'dipy.tracking.streamline' (/home/brain/.local/lib/python3.8/site-packages/dipy/tracking/streamline.py)
I am using TractSeg via Ubuntu with Windows Virtualbox. python version 3.8.10 pip3 version pip 20.0.2 pytorch was successfully installed.
Is there something that I fix this?
Thanks.
That is strange. Master should work. Does it work if you downgrade dipy, e.g. pip install --upgrade dipy==1.4.0 ?
Thank you for your important suggestions. I have installed dipy version 1.0.4. Then Tractseg was able to run halfway but was killed halfway. It was displayed below.
Traceback (most recent call last): 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)... Creating peaks (2 of 3)... Creating peaks (3 of 3)... Loading weights from: /home/brain/.tractseg/pretrained_weights_tract_segmentation_v3.npz Downloading pretrained weights (~140MB) ... Processing direction (1 of 3) 0%| | 0/144 [00:00<?, ?it/s][W NNPACK.cpp:51] Could not initialize NNPACK! Reason: Unsupported hardware. 100%|█████████████████████████████████████████| 144/144 [01:00<00:00, 2.38it/s] Processing direction (2 of 3) 100%|█████████████████████████████████████████| 144/144 [01:13<00:00, 1.97it/s] Processing direction (3 of 3) 100%|█████████████████████████████████████████| 144/144 [01:00<00:00, 2.39it/s] Forced termination
Would you tell me the way how can I get to finish this process?
Thank you.
Sorry, the version of dipy was 1.4.0 instead of 1.0.4.