MarcCote / tractconverter

Converter for different neuro-imaging file formats.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installer crash on python 3

samuelstjean opened this issue · 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/

Same error here @MarcCote

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.

strip out?

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

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?

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?

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?