Hi,
On 01.05.06, Michael V. De Palatis wrote:
> I am new to PyX, and recently upgraded my laptop from Ubuntu Breezy to
> the beta of Dapper. Previously, I had no troubles getting the latest
> source version of PyX to work, but now when I try to import pyx, I get
> an AttributeError complaining that 'module' has no attribute
> 'pyxrc'. The complete output is:
>
> >>> from pyx import *
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "/usr/lib/python2.4/site-packages/pyx/__init__.py", line 41, in
> ?
> __import__(module, globals(), locals(), [])
> File "/usr/lib/python2.4/site-packages/pyx/graph/__init__.py", line
> 27, in ?
> __import__(module, globals(), locals(), [])
> File "/usr/lib/python2.4/site-packages/pyx/graph/data.py", line 26,
> in ?
> from pyx import mathtree, text
> File "/usr/lib/python2.4/site-packages/pyx/text.py", line 25, in ?
> import config, siteconfig, unit, box, canvas, trafo, version,
> attr, style, dvifile
> File "/usr/lib/python2.4/site-packages/pyx/config.py", line 26, in ?
> cflist = [siteconfig.pyxrc, os.path.expanduser("~/.pyxrc")]
> AttributeError: 'module' object has no attribute 'pyxrc'
>
> Most likely, the issue involved here is that of a missing package. I
> had a similar issue with another module that I compiled from source,
> and it seems that the Ubuntu python module packaging system has been
> rearranged a bit. Unfortunately, I'm not really sure which one I may
> need to install.
>
> Any ideas?
This seems to be a problem with having a wrong siteconfig.py file.
Note that:
1) there is a siteconfig.py file in the contribution, where all paths
are relative to the location of the siteconfig.py file itself
2) a fresh siteconfig.py file is created by the install.py script and
it then contains the proper location of /usr/share and /etc. (i.e. the
lfs files and some other resource files and the global pyxrc file).
Beside that the situation is more complicated, since in previous
versions of PyX we had a pyxrc variable in siteconfig, whereas we now
only keep directoryies and have a pyxrcdir variable in the
siteconfig.py file now (this is due to some
restructuring/simplification in setup.py I did for PyX 0.8 -- IIRC).
Overall there seems to be a version mixup on your maschine. Maybe the
help I've just given you allows you to just edit the siteconfig.py
file and fill out the proper paths (just edit this file by hand should
overcome the problem ... although this sounds hackish, I think its a
valid solution here). Or you try out why this version mixup happend on
your maschine.
HTH,
André
--
by _ _ _ Dr. André Wobst
/ \ \ / ) [EMAIL PROTECTED], http://www.wobsta.de/
/ _ \ \/\/ / PyX - High quality PostScript and PDF figures
(_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user