setup scripts

This morning I am having trouble installing from the svn repository. My home
machine does not have setuptools installed, and the standard python setup.py
install fails because it wants to import setuptools.

If I install setuptools, I am able to install, but not run pylab:

In [1]: from pylab import *

···

---------------------------------------------------------------------------
<type 'exceptions.Exception'> Traceback (most recent call last)

/home/darren/<ipython console> in <module>()

/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/pylab.py
in <module>()
----> 1 from matplotlib.pylab import *
      2 import matplotlib.pylab
      3 __doc__ = matplotlib.pylab.__doc__

/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/matplotlib/pylab.py
in <module>()
    198 """
    199 import sys, warnings
--> 200 import cm
    201 import _pylab_helpers
    202 import mlab #so I can override hist, psd, etc...

/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/matplotlib/cm.py
in <module>()
      4
      5 import matplotlib as mpl
----> 6 import matplotlib.colors as colors
      7 import matplotlib.numerix.npyma as ma
      8 import matplotlib.cbook as cbook

/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/matplotlib/colors.py
in <module>()
     36 import re
     37 import warnings
---> 38 import numpy as npy
     39 import matplotlib.numerix.npyma as ma
     40 import matplotlib.cbook as cbook

/usr/lib/python2.5/site-packages/numpy-1.0.4.dev3884-py2.5-linux-i686.egg/numpy/__init__.py
in <module>()
     44 import fft
     45 import random
---> 46 import ctypeslib
     47
     48 # Make these accessible from numpy name-space

/usr/lib/python2.5/site-packages/numpy-1.0.4.dev3884-py2.5-linux-i686.egg/numpy/ctypeslib.py
in <module>()
      7
      8 try:
----> 9 import ctypes
     10 except ImportError:
     11 ctypes = None

/usr/lib/python2.5/site-packages/ctypes/__init__.py in <module>()
     26
     27 if __version__ != _ctypes_version:
---> 28 raise Exception, ("Version number mismatch", __version__,
_ctypes_version)
     29
     30 if _os.name in ("nt", "ce"):

<type 'exceptions.Exception'>: ('Version number mismatch', '1.0.0', '1.0.2')

Darren

As a stopgap measure until someone with more knowledge of these changes replies, the following worked for me. In setup.py, uncomment the old distutils import, and comment the new setuptools import:

#from distutils.core import Extension, setup
from setuptools import setup

to

from distutils.core import Extension, setup
#from setuptools import setup

Obviously not the "real" fix, but I was able to install and use pylab.

Cheers,
Mike

Darren Dale wrote:

···

This morning I am having trouble installing from the svn repository. My home machine does not have setuptools installed, and the standard python setup.py install fails because it wants to import setuptools.

If I install setuptools, I am able to install, but not run pylab:

In [1]: from pylab import *
---------------------------------------------------------------------------
<type 'exceptions.Exception'> Traceback (most recent call last)

/home/darren/<ipython console> in <module>()

/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/pylab.py in <module>()
----> 1 from matplotlib.pylab import *
      2 import matplotlib.pylab
      3 __doc__ = matplotlib.pylab.__doc__

/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/matplotlib/pylab.py in <module>()
    198 """
    199 import sys, warnings
--> 200 import cm
    201 import _pylab_helpers
    202 import mlab #so I can override hist, psd, etc...

/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/matplotlib/cm.py in <module>()
      4
      5 import matplotlib as mpl
----> 6 import matplotlib.colors as colors
      7 import matplotlib.numerix.npyma as ma
      8 import matplotlib.cbook as cbook

/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/matplotlib/colors.py in <module>()
     36 import re
     37 import warnings
---> 38 import numpy as npy
     39 import matplotlib.numerix.npyma as ma
     40 import matplotlib.cbook as cbook

/usr/lib/python2.5/site-packages/numpy-1.0.4.dev3884-py2.5-linux-i686.egg/numpy/__init__.py in <module>()
     44 import fft
     45 import random
---> 46 import ctypeslib
     47
     48 # Make these accessible from numpy name-space

/usr/lib/python2.5/site-packages/numpy-1.0.4.dev3884-py2.5-linux-i686.egg/numpy/ctypeslib.py in <module>()
      7
      8 try:
----> 9 import ctypes
     10 except ImportError:
     11 ctypes = None

/usr/lib/python2.5/site-packages/ctypes/__init__.py in <module>()
     26
     27 if __version__ != _ctypes_version:
---> 28 raise Exception, ("Version number mismatch", __version__, _ctypes_version)
     29
     30 if _os.name in ("nt", "ce"):

<type 'exceptions.Exception'>: ('Version number mismatch', '1.0.0', '1.0.2')

Darren

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options

It looks like Edin made setuptools required in svn, which I just
reverted. Edin -- why? I'm a fan of setuptools, but I don't think we
should require a prerequisite that isn't necessary. Of course, if the
developers decide we want to require setuptools, I'm happy to support
the change, but it should probably have some kind of consensus.

Edin, if you want to use setuptools for your own installations, you can
do, from the command line

python -c "import setuptools; execfile('setup.py')" install

In fact, I have the attached script in my path, so I just type "ssetup
install" to use setuptools to install stuff. This also works with devel
mode. The script sets a few more things to handle assumptions that
setup.py files sometimes make.

-Andrew

Michael Droettboom wrote:

ssetup (154 Bytes)

···

As a stopgap measure until someone with more knowledge of these changes
replies, the following worked for me. In setup.py, uncomment the old
distutils import, and comment the new setuptools import:

#from distutils.core import Extension, setup
from setuptools import setup

to

from distutils.core import Extension, setup
#from setuptools import setup

Obviously not the "real" fix, but I was able to install and use pylab.

Cheers,
Mike

Darren Dale wrote:

This morning I am having trouble installing from the svn repository. My home
machine does not have setuptools installed, and the standard python setup.py
install fails because it wants to import setuptools.

If I install setuptools, I am able to install, but not run pylab:

In [1]: from pylab import *
---------------------------------------------------------------------------
<type 'exceptions.Exception'> Traceback (most recent call last)

/home/darren/<ipython console> in <module>()

/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/pylab.py
in <module>()
----> 1 from matplotlib.pylab import *
      2 import matplotlib.pylab
      3 __doc__ = matplotlib.pylab.__doc__

/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/matplotlib/pylab.py
in <module>()
    198 """
    199 import sys, warnings
--> 200 import cm
    201 import _pylab_helpers
    202 import mlab #so I can override hist, psd, etc...

/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/matplotlib/cm.py
in <module>()
      4
      5 import matplotlib as mpl
----> 6 import matplotlib.colors as colors
      7 import matplotlib.numerix.npyma as ma
      8 import matplotlib.cbook as cbook

/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/matplotlib/colors.py
in <module>()
     36 import re
     37 import warnings
---> 38 import numpy as npy
     39 import matplotlib.numerix.npyma as ma
     40 import matplotlib.cbook as cbook

/usr/lib/python2.5/site-packages/numpy-1.0.4.dev3884-py2.5-linux-i686.egg/numpy/__init__.py
in <module>()
     44 import fft
     45 import random
---> 46 import ctypeslib
     47
     48 # Make these accessible from numpy name-space

/usr/lib/python2.5/site-packages/numpy-1.0.4.dev3884-py2.5-linux-i686.egg/numpy/ctypeslib.py
in <module>()
      7
      8 try:
----> 9 import ctypes
     10 except ImportError:
     11 ctypes = None

/usr/lib/python2.5/site-packages/ctypes/__init__.py in <module>()
     26
     27 if __version__ != _ctypes_version:
---> 28 raise Exception, ("Version number mismatch", __version__,
_ctypes_version)
     29
     30 if _os.name in ("nt", "ce"):

<type 'exceptions.Exception'>: ('Version number mismatch', '1.0.0', '1.0.2')

Darren

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options
  
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options

It looks like Edin made setuptools required in svn, which I just
reverted. Edin -- why? I'm a fan of setuptools, but I don't think we
should require a prerequisite that isn't necessary. Of course, if the
developers decide we want to require setuptools, I'm happy to support
the change, but it should probably have some kind of consensus.

I apologize for creating the fuss, it was a stupid mistake (I
overlooked the fact that we require setuptools only for Python 2.3).

Edin, if you want to use setuptools for your own installations, you can
do, from the command line

python -c "import setuptools; execfile('setup.py')" install

Thanks for the tip.

Best,
Edin

···

On 7/16/07, Andrew Straw <strawman@...36...> wrote: