acil-bwh / ChestImagingPlatform

Chest Imaging Platform (CIP)
Other
55 stars 34 forks source link

lung_lobe_segmentation_workflow.py throws up ImportError #22

Closed avnishks closed 4 years ago

avnishks commented 6 years ago

Hi, I installed CIP on a ubuntu 16.04 machine using cmake 3.7.2. The installation completed without any errors. Now I want to do lung segmentation on my data, for which I use the following script: $python ~/ChestImagingPlatform/ChestImagingPlatform-build/CIP-build/cip_python/nipype/workflows/lung_lobe_segmentation_workflow.py --in_ct ~/1700_img.nrrd --out ~/test.nrrd

But this throws up an Import error: File "~/ChestImagingPlatform/ChestImagingPlatform-build/CIP-build/cip_python/nipype/workflows/lung_lobe_segmentation_workflow.py", line 4, in <module> import cip_python.nipype.interfaces.cip as cip ImportError: No module named cip_python.nipype.interfaces.cip

I see the __init__.py file in the _cippython, nipype and the interfaces folders and hence am confused about the reason for this error. Did anyone else encounter this issue?

PS: the CIP-build/bin folder is in my system path.

rjosest commented 6 years ago

Hi Avnish,

Thank you for reaching out. Let us look at the issue and see if we can replicate the same error.

Thanks

/R

On Nov 27, 2017, at 11:53 AM, Avnish Kumar notifications@github.com<mailto:notifications@github.com> wrote:

Hi, I installed CIP on a ubuntu 16.04 machine using cmake 3.7.2. The installation completely without any errors. Now I want to do lung segmentation on my data, for which I use the following script: $python ~/ChestImagingPlatform/ChestImagingPlatform-build/CIP-build/cip_python/nipype/workflows/lung_lobe_segmentation_workflow.py --in_ct ~/1700_img.nrrd --out ~/test.nrrd

But this throws up an Import error: File "~/ChestImagingPlatform/ChestImagingPlatform-build/CIP-build/cip_python/nipype/workflows/lung_lobe_segmentation_workflow.py", line 4, in import cip_python.nipype.interfaces.cip as cip ImportError: No module named cip_python.nipype.interfaces.cip

I see the init.py file in the cip_python, nipype and the interfaces folders and hence am confused about the reason for this error. Did anyone else encounter this issue?

PS: the 'CIP-build/bin' folder is in my system path.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/acil-bwh/ChestImagingPlatform/issues/22, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADD8koOaCF1Uc4dSHCSH7EeT72b9uV33ks5s6ukFgaJpZM4Qr82F.

The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.

jcross186 commented 6 years ago

Hi Avnish,

A couple of things: first, in your email you mention that you want to do lung segmentation, but you are invoking the lung lobe segmentation workflow. If your application only calls for lung segmentation, I recommend just invoking the ‘GeneratePartialLungLabelMap’ command line tool, which can be found in ~/CIP-build/bin.

However, if you want to do lobe segmentation as well, then you are correct in choosing ‘lung_lobe_segmentation_workflow.py’. I have just committed a couple of changes. Please do an update in the 'develop’ branch, remove ‘~/CIP-build/cip_python/‘, and then rebuild (run make within ‘CIP-build’). You might also want to ensure that ‘CIP-build’ is in your python path.

Please let us know if you continue to have issues.

Best,

-James

From: Raul San Jose notifications@github.com<mailto:notifications@github.com> Reply-To: acil-bwh/ChestImagingPlatform reply@reply.github.com<mailto:reply@reply.github.com> Date: Monday, November 27, 2017 at 12:14 PM To: acil-bwh/ChestImagingPlatform ChestImagingPlatform@noreply.github.com<mailto:ChestImagingPlatform@noreply.github.com> Cc: Subscribed subscribed@noreply.github.com<mailto:subscribed@noreply.github.com> Subject: Re: [acil-bwh/ChestImagingPlatform] lung_lobe_segmentation_workflow.py throws up ImportError (#22)

Hi Avnish,

Thank you for reaching out. Let us look at the issue and see if we can replicate the same error.

Thanks

/R

On Nov 27, 2017, at 11:53 AM, Avnish Kumar notifications@github.com<mailto:notifications@github.commailto:notifications@github.com> wrote:

Hi, I installed CIP on a ubuntu 16.04 machine using cmake 3.7.2. The installation completely without any errors. Now I want to do lung segmentation on my data, for which I use the following script: $python ~/ChestImagingPlatform/ChestImagingPlatform-build/CIP-build/cip_python/nipype/workflows/lung_lobe_segmentation_workflow.py --in_ct ~/1700_img.nrrd --out ~/test.nrrd

But this throws up an Import error: File "~/ChestImagingPlatform/ChestImagingPlatform-build/CIP-build/cip_python/nipype/workflows/lung_lobe_segmentation_workflow.py", line 4, in import cip_python.nipype.interfaces.cip as cip ImportError: No module named cip_python.nipype.interfaces.cip

I see the init.py file in the cip_python, nipype and the interfaces folders and hence am confused about the reason for this error. Did anyone else encounter this issue?

PS: the 'CIP-build/bin' folder is in my system path.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/acil-bwh/ChestImagingPlatform/issues/22, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADD8koOaCF1Uc4dSHCSH7EeT72b9uV33ks5s6ukFgaJpZM4Qr82F.

The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/acil-bwh/ChestImagingPlatform/issues/22#issuecomment-347253773, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD2glIRaqoGQTwHyzhT3Gtkt2IxD68I-ks5s6u4BgaJpZM4Qr82F.

ShibaPrasad commented 4 years ago

Hi Avnish,

I Getting below while installing in Ubunutu Ubuntu 18.04.4 LTS and cmake 10.2 . Would you please help me and give your comments.

/usr/bin/cmake: /opt/nfsopt/anaconda3/anaconda3-2019.10/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake) /usr/bin/cmake: /opt/nfsopt/anaconda3/anaconda3-2019.10/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake) [ 34%] Performing installpynrrd step for 'CIPPython' DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. /usr/bin/cmake: /opt/nfsopt/anaconda3/anaconda3-2019.10/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake) /usr/bin/cmake: /opt/nfsopt/anaconda3/anaconda3-2019.10/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake) [ 35%] Performing installpydicom step for 'CIPPython' DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. /usr/bin/cmake: /opt/nfsopt/anaconda3/anaconda3-2019.10/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake) /usr/bin/cmake: /opt/nfsopt/anaconda3/anaconda3-2019.10/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake) [ 36%] Completed 'CIPPython' /usr/bin/cmake: /opt/nfsopt/anaconda3/anaconda3-2019.10/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake) /usr/bin/cmake: /opt/nfsopt/anaconda3/anaconda3-2019.10/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake) /usr/bin/cmake: /opt/nfsopt/anaconda3/anaconda3-2019.10/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake) /usr/bin/cmake: /opt/nfsopt/anaconda3/anaconda3-2019.10/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake) [ 36%] Built target CIPPython Makefile:94: recipe for target 'all' failed make: *** [all] Error 2

Also getting below error: -- Configuring incomplete, errors occurred! See also "/localscratch/Users/skuanar/tf/ChestImagingPlatform-build/OpenCV-build/CMakeFiles/CMakeOutput.log". See also "/localscratch/Users/skuanar/tf/ChestImagingPlatform-build/OpenCV-build/CMakeFiles/CMakeError.log". CMakeFiles/OpenCV.dir/build.make:105: recipe for target 'OpenCV-prefix/src/OpenCV-stamp/OpenCV-configure' failed make[2]: [OpenCV-prefix/src/OpenCV-stamp/OpenCV-configure] Error 1 CMakeFiles/Makefile2:110: recipe for target 'CMakeFiles/OpenCV.dir/all' failed make[1]: [CMakeFiles/OpenCV.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... done

avnishks commented 4 years ago

Hi Shiba,

A quick comment: this error seems to be unrelated to CIP, but instead because of broken linking between the CMake and CURL library. You might wanna google for that. For example: https://stackoverflow.com/a/38896967

Best, Avnish