py2exe error

Having installation problems look here for help

py2exe error

Postby dominic999 » Mon May 04, 2009 2:51 pm

Hi there,

I'm really thrilled about Editra and would like to have an executable version of it. I tried to do it with
Code: Select all
python setup.py py2exe

but to no avail. At first, I got an error related to the file ._issuelist.py which was not a text file as expected. I replaced it with the issuelist.py file, hoping it would do the trick. But I had another error:
Code: Select all
import_hook
parent = self.dermine_parent(caller, level=level)
File=...py2exe\mf.py line 172 in determine_parent
    parent = self.modules[pname]
KeyError: 'syntax.'

I'm not a programmer although I use python a lot, so that's as far as I can go for now.

Thanks in advance!
Dominic
dominic999
User
 
Posts: 10
Joined: Mon May 04, 2009 2:21 pm

Re: py2exe error

Postby cody » Mon May 04, 2009 3:15 pm

Hello,

1) There are exe's already available for download on the downloads page (http://editra.org/download).

2) Where/how did you get the source code? SVN, downloaded tarball, python egg?

3) What was the full path of the ._issuelist.py file you had an error with at first? That file does not exist (and it shouldn't), there is an issuelist.py file in Editra\src\syntax that is a regular python module. It almost seems like it was trying to access the files in the .svn directory but I am only guessing because I don't know answer to #2 ;)

4) What version of Python/wxPython/py2exe are you using?



Cody
User avatar
cody
Site Admin
 
Posts: 1307
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: py2exe error

Postby dominic999 » Mon May 04, 2009 3:33 pm

Hi cody, thanks for the (quick!) response.

1) I followed recommendation on http://editra.org/setup_python_ide
If your a Python developer, I highly suggest installing Editra from source using the supplied setup.py script as opposed to installing the binary distributions.

Unless I'm mistaken, I think installing from binaries would not allow me to get as much from Editra when it comes to the third-party modules (autocomplete features and so on).

2) http://editra.org/uploads/src/Editra-0.4.88.tar.gz

3) C:\Documents and Settings\me\Downloads\Editra-0.4.88\src\syntax\._issuelist.py (It does exist, unless WinZip created it!)

4) Python 2.5.2, wx 2.8.9.2, py2exe 0.6.9

Thanks again,

Dominic
dominic999
User
 
Posts: 10
Joined: Mon May 04, 2009 2:21 pm

Re: py2exe error

Postby cody » Mon May 04, 2009 3:49 pm

Hello,

dominic999 wrote:Hi cody, thanks for the (quick!) response.

1) I followed recommendation on http://editra.org/setup_python_ide
If your a Python developer, I highly suggest installing Editra from source using the supplied setup.py script as opposed to installing the binary distributions.

Unless I'm mistaken, I think installing from binaries would not allow me to get as much from Editra when it comes to the third-party modules (autocomplete features and so on).
[/url]


Yes, that means "do not" build and exe as that will end up with the same thing as you download from this site. When you build a py2exe executable it creates a self contained python environment that Editra will run in and the autocomp will only have access to provide completions for the libraries that are inside that executable not any other 3rd party libs you may have on your system.

I think there is a few hoops you need to jump through to create a desktop link to start a source installed version of Editra on windows right now (which I hope to resolve sometime soon), but I don't use windows very often so I am not a 100% sure at the moment of that. Editra is included with wxPython and there are some conflicts with the launcher script it installs and the one that my setup.py install, so if you do a

Code: Select all
python setup.py install


I think you will need to go to the C:\\PythonXX\Scripts directory and modify the editra.bat file to point at the new installation you just did and no the wxpython installed one. You may also need to remove the 'Editra.py[w]' scripts from that directory as well. Then you should be able to create a link to the bat file and launch it just like an executable.

[quote="dominic999"]
[url]
3) C:\Documents and Settings\me\Downloads\Editra-0.4.88\src\syntax\._issuelist.py (It does exist, unless WinZip created it!)
[/url][quote]

I will check the tarballs later but that file should not exist, so it may be either a temp file made by winzip or by python distools when I bundled the tarball.
User avatar
cody
Site Admin
 
Posts: 1307
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: py2exe error

Postby dominic999 » Mon May 04, 2009 8:31 pm

Hi,

Ok so I will give up the idea of having Editra fully integrated ("open with" contextual item) on my machine for now then. I can live with that!

Thanks Cody

PS: the ._issuelist.py's creation date is dec 11th 2008, so we can rule out its creation by Winzip.
dominic999
User
 
Posts: 10
Joined: Mon May 04, 2009 2:21 pm

Re: py2exe error

Postby cody » Tue May 05, 2009 12:58 am

dominic999 wrote:Hi,

Ok so I will give up the idea of having Editra fully integrated ("open with" contextual item) on my machine for now then. I can live with that!


See attachment, should work for you (may need small tweaks).


dominic999 wrote:PS: the ._issuelist.py's creation date is dec 11th 2008, so we can rule out its creation by Winzip.


Odd, I can't find that file anywhere in my source tree, the last time that file was modified in in the repo was Dec 11 2008. Strange, strange, strange... Will keep an eye open for it though.


Cody
Attachments
AddEditraToWinContextMenu 2.reg
Reg file for adding 'open with' context menu entries for source install of Editra
(424 Bytes) Downloaded 322 times
User avatar
cody
Site Admin
 
Posts: 1307
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: py2exe error

Postby dominic999 » Tue May 05, 2009 1:08 pm

The joys of registry! Thanks Cody, that's neat (did need some tweaking but it's worth it).

Dominic
dominic999
User
 
Posts: 10
Joined: Mon May 04, 2009 2:21 pm

Re: py2exe error

Postby cody » Tue May 05, 2009 1:36 pm

Great,

If you got everything working, would you mind posting some detailed steps of what you had to do. I will then try to automate it from the setup script so its easier to do in the future.

Thanks,

Cody
User avatar
cody
Site Admin
 
Posts: 1307
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: py2exe error

Postby dominic999 » Tue May 05, 2009 2:23 pm

Sure,

1- removed those 3 files from ...\Python25\Scripts

Code: Select all
    Editra.pyw
    Editra.pyc
    Editra


2- copied the file ...\Python25\Lib\site-packages\Editra\Editra to the ...\Python25\Scripts directory

3- modified .bat file: the path to pythonw.exe is in my case "C:\Program Files\Python25\pythonw.exe"

4- did the same path adjustments to the registry item

I think that's it, hope I'm not forgetting anything.

Cheers!

Dominic
dominic999
User
 
Posts: 10
Joined: Mon May 04, 2009 2:21 pm


Return to Installation Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron