Running new version from source.

285 views
Skip to first unread message

D. M. Tishler

unread,
Feb 3, 2012, 7:40:55 PM2/3/12
to dicom...@googlegroups.com
With the new release of dicompyler, the python module is required to run the source code. I run the main.py from a folder in my "DropBox", but I noticed that errors were being generated from within the python site-packages folder where the module had been installed by easy_install. I see now that I must use these dicompyler files if I wish to bebug and work with the source. Is there any way to run the source from a contained directory?

Also,  are there any plans to create a windows installer for the dicompyler python module? I am attempting to assist someone with installing python and the required packages to run from source. This is a nearly automatic process on windows until you must use easy_install to add the dicompyler module. Is there another way to install the dicompyler module which does not require terminal access?

Thanks,
DMT

Adit Panchal

unread,
Feb 5, 2012, 6:21:32 PM2/5/12
to dicom...@googlegroups.com
There are essentially 4 ways to get dicompyler:

1. Download the latest binary version for Mac or Windows -
http://code.google.com/p/dicompyler/downloads/list
2. Download and extract the latest tar.gz from the Google Code
downloads page - http://code.google.com/p/dicompyler/downloads/list
3. Run "easy_install dicompyler" or "pip install dicompyler" to
install the dicompyler package into your site-packages folder.
4. Use Mercurial and check out the latest source code from the
repository - http://code.google.com/p/dicompyler/source/checkout

The last 3 methods are recommended for developing plugins. For methods
2 and 4, you will end up with a folder usually named dicompyler or
dicompyler-versionnumber in which you will find a dicompyler_app.py
script. This is the most optimal way since version 0.4 to run
dicompyler:

i.e. python dicompyler_app.py

For the Python package (method 3), a script called dicompyler should
be placed within the path after installation. You should be able to
run this script from anywhere to execute dicompyler. This script is
almost identical to the dicompyler_app.py script from methods 2 and 4.

It is not recommended to use main.py anymore, and I think the
documentation on the website should have been updated to reflect this.

Regarding a Windows installer for the Python package, I can put it on
the todo list for the next release. In the meantime, methods 2 or 4
are recommended.

If you want to stay updated with the latest changes, checking out from
source (method 4) and monitoring the repository either via RSS,
Twitter or the dicompyler-dev Google Group is suggested.

Hope that clears up some confusion.

Adit

Robin Cole

unread,
May 11, 2015, 8:58:28 PM5/11/15
to dicom...@googlegroups.com
Hi attempting to run dicompyler_app.py via the console, getting an error from main.py 

ImportError: cannot import name Publisher

How to work around this?
Thanks
Robin

Adit Panchal

unread,
May 20, 2015, 1:50:06 AM5/20/15
to dicom...@googlegroups.com
Hi Robin,

The problem is that the code targets wxPython 2.8. However, wxPython 2.9 and higher use a newer version of PubSub.

There are two ways to get around this. The easiest is to install wxPython 2.8 if possible. The second is to change all lines of code in the dicompyler source to be compatible with the new version of PubSub as follows:

- from wx.lib.pubsub import Publisher as pub
+ import wx.lib.pubsub.setuparg1
+ import wx.lib.pubsub.core
+ pub = wx.lib.pubsub.core.Publisher()

This has to be done for the plugins as well.

See this patch for more info: 


Hope that helps,

Adit

--
-- You received this message because you are subscribed to the Google Groups dicompyler group. To post to this group, send email to dicom...@googlegroups.com. To unsubscribe from this group, send email to dicompyler+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/dicompyler?hl=en
---
You received this message because you are subscribed to the Google Groups "dicompyler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dicompyler+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages