Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyAFQ released version not found; development version returning error #114

Closed
lucindasisk opened this issue May 21, 2019 · 4 comments
Closed

Comments

@lucindasisk
Copy link

lucindasisk commented May 21, 2019

Hi!

I've been working on implementing pyAFQ in a pipeline, and have encountered a couple odd issues. Firstly, I was unable to install the released version using macOSX, though I was able to install it through pip on a Linux machine. On the Mac, I just got the generic pip error "ERROR: Could not find a version that satisfies the requirement AFQ (from versions: none) ERROR: No matching distribution found for AFQ". I went ahead and installed the development version, but have since been running into an error with convex_hull.py returning ValueError 'Input must be a 2D image', 'occurred at index 0'. The same data ran without a problem on the Linux machine using the released version of the software. Thank you so much for any insight into what I’m doing wrong here :)

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-8-e771d817d53c> in <module>
      7 myafq.set_dti_pdd()
      8 myafq.set_template_xform()
----> 9 myafq.export_rois()
     10 myafq.export_bundles()
     11 myafq.combine_profiles()

/usr/local/anaconda3/lib/python3.6/site-packages/AFQ/api.py in export_rois(self)
   1072                               args=[self.bundle_dict,
   1073                                     self.reg_template],
-> 1074                               axis=1)
   1075 
   1076     def export_bundles(self):

/usr/local/anaconda3/lib/python3.6/site-packages/pandas/core/frame.py in apply(self, func, axis, broadcast, raw, reduce, result_type, args, **kwds)
   6485                          args=args,
   6486                          kwds=kwds)
-> 6487         return op.get_result()
   6488 
   6489     def applymap(self, func):

/usr/local/anaconda3/lib/python3.6/site-packages/pandas/core/apply.py in get_result(self)
    149             return self.apply_raw()
    150 
--> 151         return self.apply_standard()
    152 
    153     def apply_empty_result(self):

/usr/local/anaconda3/lib/python3.6/site-packages/pandas/core/apply.py in apply_standard(self)
    255 
    256         # compute the result using the series generator
--> 257         self.apply_series_generator()
    258 
    259         # wrap results

/usr/local/anaconda3/lib/python3.6/site-packages/pandas/core/apply.py in apply_series_generator(self)
    284             try:
    285                 for i, v in enumerate(series_gen):
--> 286                     results[i] = self.f(v)
    287                     keys.append(v.name)
    288             except Exception as e:

/usr/local/anaconda3/lib/python3.6/site-packages/pandas/core/apply.py in f(x)
     76 
     77             def f(x):
---> 78                 return func(x, *args, **kwds)
     79         else:
     80             f = func

/usr/local/anaconda3/lib/python3.6/site-packages/AFQ/api.py in _export_rois(row, bundle_dict, reg_template, force_recompute)
    575                 (mapping.transform_inverse(
    576                     roi.get_data(),
--> 577                     interpolation='linear')) > 0).astype(int)
    578             # Cast to float32, so that it can be read in by MI-Brain:
    579             nib.save(nib.Nifti1Image(warped_roi.astype(np.float32),

/usr/local/anaconda3/lib/python3.6/site-packages/AFQ/utils/volume.py in patch_up_roi(roi, sigma, truncate)
     27 
     28     return convex_hull_image(gaussian(ndim.binary_fill_holes(roi),
---> 29                                       sigma=sigma, truncate=truncate) > 0)

/usr/local/anaconda3/lib/python3.6/site-packages/skimage/morphology/convex_hull.py in convex_hull_image(image)
     36     """
     37     if image.ndim > 2:
---> 38         raise ValueError("Input must be a 2D image")
     39 
     40     if Delaunay is None:

ValueError: ('Input must be a 2D image', 'occurred at index 0')
@arokem
Copy link
Collaborator

arokem commented May 22, 2019

Thanks for reporting this! We are not quite ready to release this software quite yet... But installing from source as you have should still work.

Regarding your specific error. What versions of scikit image do you have installed on these two machines? For example, what happens when you execute the following on both of these machines?

python -c"import skimage; print(skimage.__version__)"

@lucindasisk
Copy link
Author

Thanks so much for your response! I have scikit 0.13.1 installed in both locations. Just to clarify, do you mean installing via github or using a python package manager should still work? Thank you again!

@arokem
Copy link
Collaborator

arokem commented May 22, 2019

I have scikit 0.13.1 installed in both locations.

Hmm. I still suspect that there is a version of something that is different (the data is identical, right?). Could you run a pip freeze on both machines and send that over?

Just to clarify, do you mean installing via github or using a python package manager should still work?

Sorry. Install from GitHub for now!

@lucindasisk
Copy link
Author

Sounds good! I was actually able to get it to run successfully on the Mac by installing scikit-image==0.14.0 per the requirements textfile. Thanks for pointing me in the right direction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants