tractconverter icon indicating copy to clipboard operation
tractconverter copied to clipboard

Installer crash on python 3

Open samuelstjean opened this issue 8 years ago • 7 comments

Simple answer would be the distribute file needs an update, or maybe just remove it as it is pretty standard to have that nowadays (I'll probably od that on my side also).

Works fine on python 2 though.

samuel ~/git/scilpy (nlsam_merge_back_1|MERGING) $ pip install https://github.com/MarcCote/tractconverter/archive/master.zip --user
Collecting https://github.com/MarcCote/tractconverter/archive/master.zip
  Downloading https://github.com/MarcCote/tractconverter/archive/master.zip
     / 40kB 376kB/s
    Complete output from command python setup.py egg_info:
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
    Extracting in /tmp/tmp2yrk38cm
    Traceback (most recent call last):
      File "/tmp/pip-p4oixxmq-build/distribute_setup.py", line 143, in use_setuptools
        raise ImportError
    ImportError

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-p4oixxmq-build/setup.py", line 13, in <module>
        distribute_setup.use_setuptools()
      File "/tmp/pip-p4oixxmq-build/distribute_setup.py", line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "/tmp/pip-p4oixxmq-build/distribute_setup.py", line 125, in _do_download
        _build_egg(egg, tarball, to_dir)
      File "/tmp/pip-p4oixxmq-build/distribute_setup.py", line 99, in _build_egg
        _extractall(tar)
      File "/tmp/pip-p4oixxmq-build/distribute_setup.py", line 467, in _extractall
        self.chown(tarinfo, dirpath)
    TypeError: chown() missing 1 required positional argument: 'numeric_owner'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-p4oixxmq-build/

samuelstjean avatar Jun 15 '16 20:06 samuelstjean

Same error here @MarcCote

tashrifbillah avatar Feb 25 '19 17:02 tashrifbillah

Easiest to make it work is probably to strip out the file, I doubt marc-alexandre still fixes stuff in this as it's getting quite old.

samuelstjean avatar Feb 25 '19 18:02 samuelstjean

strip out?

tashrifbillah avatar Feb 25 '19 18:02 tashrifbillah

Well, download the release/clone the master, kill off the distribute_setup.py (as it is probably included nowadays), install the rest as usual.

samuelstjean avatar Feb 25 '19 19:02 samuelstjean

Hi @tashrifbillah, tractconverter has been deprecated in favor of Nibabel for anything related to .tck or .trk file formats. Are you using the .vtk file format?

MarcCote avatar Feb 25 '19 20:02 MarcCote

Hi @MarcCote ,

So, my task was to find a converter that can do trk to vtk file conversion. Googled, and found your repo. Gave it a shot to see if I can install w/o outstanding issues. Experiencing one, followed @samuelstjean's suggestion to omit the distribute_setup.py file. Then, I encountered a number of Py2 vs Py3 issues. Finally, gave up.

But based on your comment, it looks like we can't use your converter to convert trk to vtk anymore, right?

tashrifbillah avatar Feb 25 '19 21:02 tashrifbillah

VTK format is very generic, different softwares might have different conventions on how to store streamlines information. So, it is not guaranteed that tractconverter will be able to convert them but it worth a try.

I think the fastest and easiest would be to run it with Python 2. This can be done using Conda environment and installing tractconverter in a Python2 environment.

What software will read the .vtk?

MarcCote avatar Feb 26 '19 00:02 MarcCote