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

Problem with Install CMTK on windows machine #12

Open
mkunst23 opened this issue May 18, 2015 · 6 comments
Open

Problem with Install CMTK on windows machine #12

mkunst23 opened this issue May 18, 2015 · 6 comments
Labels

Comments

@mkunst23
Copy link

Hi,

I'm trying to install CMTK using the "CMTK install" plugin of the CMTK registration.

I'm not quite sure which CMTK version I should download. I used the "CMTK-3-2-3-CYGWIN-x86_64.tar.gz" since I couldn't find the windows version in the drop-down menu. When I try that I get the following error message

Traceback (most recent call last):
File "C:\Users\mkunst\Desktop\Fiji.app\plugins\CMTK_Registration\Install_CMTK.py", line 77, in
cmtkgui.download_and_untar_url(download_url,cmtkgui.install_dir(),untar_binaries,download_file)
File "pyclasspath/cmtkgui$py.class", line 370, in download_and_untar_url
File "C:\Users\mkunst\Desktop\Fiji.app\jars\jython-shaded-2.5.3.jar\Lib\tempfile.py", line 411, in close
OSError: unlink(): an unknown error occuredc:\users\mkunst\appdata\local\temp\tmp31zxdkCMTK-3.2.3-CYGWIN-x86_64.tar.gz

Best,
Michael

@jefferis
Copy link
Owner

Hi Michael,
Thanks for the bug report. This has actually been spotted by another user recently. See discussion at the end of issue #4. @tpisano did you get any further with that ?

I think the problem is some jython / windows permission issue about recursively deleting the temp folder.

Best, Greg.

@jefferis
Copy link
Owner

PS @mkunst23, Can I check that you are using the Fiji gui installer/updater?

@jefferis jefferis added the bug label May 19, 2015
jefferis added a commit that referenced this issue May 19, 2015
* this is misbehaving on Windows (see #12 and also discussion in #4)
* for the time being easiest just to keep going if we fail to delete temp file
@jefferis
Copy link
Owner

Hi @mkunst23 I've just pushed a possible workaround. Can you try running:

Plugins ... CMTK Registration ... Developer ... Update To Developer Version

(just persist if you get an err message about contacting github)

and then re-running

Plugins ... CMTK Registration ... Install CMTK.

Let me know how it goes. Best, Greg.

@mkunst23
Copy link
Author

Hey Greg,

Thanks for the quick response.

To answer your first question. Yes I used the Fiji gui installer/updater.

I tried to update jython but that wasn't the problem.

I also did this step recommended by you in an earlier post

351a462

Again, no difference

When I tried to update to the developer version I get the error message:

"Unable to read github repository"

When I click that away Fiji quits on me.

I don't think Fiji has any problems installing CMTK because I can find the cmtk folder in the Fiji.app/bin folder.

A more naive question, when I want to install CMTK via Fiji, I can't find the windows version of CMTK in the pull down menu, probably because it only displays the most recent version of CMTK (3.2.3) and the most current version for Windows is 3.2.2, could this be the problem?

I have no problem running CMTK from the command line on this computer, so in theory it should work with Fiji as well.

When I try to run the CMTL GUI I get the following messages:

Upon start of CMTK GUI

The system cannot find the path specified.

When I run CMTK

Traceback (most recent call last):
File "C:\Users\NITABA1\Desktop\Fiji.app\plugins\CMTK_Registration\CMTK_Registration_GUI.py", line 216, in
subprocess.call(script,shell=False)
File "C:\Users\NITABA
1\Desktop\Fiji.app\plugins\CMTK_Registration\CMTK_Registration_GUI.py", line 216, in
subprocess.call(script,shell=False)
File "C:\Users\NITABA1\Desktop\Fiji.app\jars\jython-shaded-2.7-b1.jar\Lib\subprocess.py", line 500, in call
File "C:\Users\NITABA
1\Desktop\Fiji.app\jars\jython-shaded-2.7-b1.jar\Lib\subprocess.py", line 830, in init
File "C:\Users\NITABA~1\Desktop\Fiji.app\jars\jython-shaded-2.7-b1.jar\Lib\subprocess.py", line 1342, in _execute_child
OSError: Cannot run program "C:\Users\Nitabachlab\Desktop\registration\commands\munger_2015-05-19_20.14.23.sh" (in directory "C:\Users\Nitabachlab\Desktop\registration"): CreateProcess error=193, %1 is not a valid Win32 application

Best,
Michael

@jefferis
Copy link
Owner

Hi Michael,

Thanks for going through these steps. Comments inline below.

I tried to update jython but that wasn't the problem.

OK

I also did this step recommended by you in an earlier post

351a462

Again, no difference

Was that the link you meant?

When I tried to update to the developer version I get the error message:

"Unable to read github repository"

There is something strange with github there, possibly because I haven't registered for an application token and github refuses to accept repeated API requests. If you try again in a minute it should work.

When I click that away Fiji quits on me.

I have now fixed the quitting Fiji error with Update to Developer version (see #13).

I don't think Fiji has any problems installing CMTK because I can find the cmtk folder in the Fiji.app/bin folder.

You are right that this problem does not prevent CMTK from being installed, but rather produces a crash on cleanup.

A more naive question, when I want to install CMTK via Fiji, I can't find the windows version of CMTK in the pull down menu, probably because it only displays the most recent version of CMTK (3.2.3) and the most current version for Windows is 3.2.2, could this be the problem?

In terms of windows versus cygwin versions, I am a bit handicapped because I do not have a Windows machine to test on. I think that I would need to produce a different script file to run directly on Windows versus with cygwin (what the app presently expects).

The general idea of this GUI is that it tries to write a script that can call CMTK installed underneath Fiji. For Windows I guess this needs to be a bat file, but at the moment it writes a .sh file for use with the cygwin shell.

I have no problem running CMTK from the command line on this computer, so in theory it should work with Fiji as well.

Actually this tool installs a separate installation of CMTK underneath the Fiji app to ensure that it knows the location/version of CMTK. So the system CMTK is not relevant. I have an open ticket to use the system CMTK (see #6) but this is actually slightly involved.

When I try to run the CMTK GUI I get the following messages:

Upon start of CMTK GUI

The system cannot find the path specified.

Can you give any more details here?

When I run CMTK

The run option is still experimental and will not work on Windows at the moment because the resultant sh script is a unix/linux/cygwin style schell script rather than a bat file.

I have marked this in the GUI app in commit 41047c4

OSError: Cannot run program "C:\Users\Nitabachlab\Desktop\registration\commands\munger_2015-05-19_20.14.23.sh" (in directory "C:\Users\Nitabachlab\Desktop\registration"): CreateProcess error=193, %1 is not a valid Win32 application

this is the relevant bit. Indeed munger_2015-05-19_20.14.23.sh is not a valid windows application. You could try installing cygwin (if you don't have it) and then running this script from inside cygwin.

Sorry not to have an immediate answer, but debugging Windows is difficult for me.

Best,

Greg.

@mkunst23
Copy link
Author

mkunst23 commented Jun 1, 2015

Hey Greg,

thanks for your response. It helped clarify things to me. Judging from what you said it is probably the easiest to use Cygwin and not worry about the Windows version.

I'll let you know if I run into any problems there.

Best,
Michael

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

No branches or pull requests

2 participants