[matplotlib-devel] Pull #2210 adding namespace package mpl_toolkits and Python 2.7

2015-07-14 Thread Albert Chin
I've built matplotlib-1.4.3 with Python 2.7.5, 3.3.2, 3.4.3. Python
3.3.2 and 3.4.3 work ok. With Python 2.7.5, I get:
File "/tmp/lines3d_demo.py", line 2, in 
  from mpl_toolkits.mplot3d import Axes3D
  ImportError: No module named mpl_toolkits.mplot3d

There is no __init__.py in the mpl_toolkits directory unlike with
matplotlib-1.3.1:
  $ ls -l /opt/TWWfsw/matplotlib14/lib/python27/mpl_toolkits
  total 64
  drwxr-xr-x+ 2 root root53 Jul 14 13:51 axes_grid
  drwxr-xr-x+ 2 root root32 Jul 14 13:51 axes_grid1
  drwxr-xr-x+ 2 root root29 Jul 14 13:51 axisartist
  -rw-r--r--+ 1 root root  3830 Dec 23  2014 exceltools.py
  -rw-r--r--+ 1 root root  3817 Jul 14 13:51 exceltools.pyc
  -rw-r--r--+ 1 root root  3817 Jul 14 13:51 exceltools.pyo
  -rw-r--r--+ 1 root root 19346 Dec 23  2014 gtktools.py
  -rw-r--r--+ 1 root root 19745 Jul 14 13:51 gtktools.pyc
  -rw-r--r--+ 1 root root 19706 Jul 14 13:51 gtktools.pyo
  drwxr-xr-x+ 2 root root17 Jul 14 13:51 mplot3d
  drwxr-xr-x+ 3 root root12 Jul 14 13:51 tests

If I copy the matplotlib-1.3.1 __init__.py to
/opt/TWWfsw/matplotlib14/lib/python27/mpl_toolkits, then everything
works ok.

-- 
albert chin (ch...@thewrittenword.com)

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Pull #2210 adding namespace package mpl_toolkits and Python 2.7

2015-07-14 Thread Eric Firing
On 2015/07/14 3:59 AM, Albert Chin wrote:
> I've built matplotlib-1.4.3 with Python 2.7.5, 3.3.2, 3.4.3. Python
> 3.3.2 and 3.4.3 work ok. With Python 2.7.5, I get:
>  File "/tmp/lines3d_demo.py", line 2, in 
>from mpl_toolkits.mplot3d import Axes3D
>ImportError: No module named mpl_toolkits.mplot3d
>
> There is no __init__.py in the mpl_toolkits directory unlike with
> matplotlib-1.3.1:
>$ ls -l /opt/TWWfsw/matplotlib14/lib/python27/mpl_toolkits
>total 64
>drwxr-xr-x+ 2 root root53 Jul 14 13:51 axes_grid
>drwxr-xr-x+ 2 root root32 Jul 14 13:51 axes_grid1
>drwxr-xr-x+ 2 root root29 Jul 14 13:51 axisartist
>-rw-r--r--+ 1 root root  3830 Dec 23  2014 exceltools.py
>-rw-r--r--+ 1 root root  3817 Jul 14 13:51 exceltools.pyc
>-rw-r--r--+ 1 root root  3817 Jul 14 13:51 exceltools.pyo
>-rw-r--r--+ 1 root root 19346 Dec 23  2014 gtktools.py
>-rw-r--r--+ 1 root root 19745 Jul 14 13:51 gtktools.pyc
>-rw-r--r--+ 1 root root 19706 Jul 14 13:51 gtktools.pyo
>drwxr-xr-x+ 2 root root17 Jul 14 13:51 mplot3d
>drwxr-xr-x+ 3 root root12 Jul 14 13:51 tests
>
> If I copy the matplotlib-1.3.1 __init__.py to
> /opt/TWWfsw/matplotlib14/lib/python27/mpl_toolkits, then everything
> works ok.
>

I suspect this results from some aspect of your system; we routinely 
build and test with python 2.7.x.  Maybe your python 2.7 setuptools 
needs to be updated?

Eric

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Pull #2210 adding namespace package mpl_toolkits and Python 2.7

2015-07-14 Thread Albert Chin
On Tue, Jul 14, 2015 at 09:22:07AM -1000, Eric Firing wrote:
> On 2015/07/14 3:59 AM, Albert Chin wrote:
> > I've built matplotlib-1.4.3 with Python 2.7.5, 3.3.2, 3.4.3. Python
> > 3.3.2 and 3.4.3 work ok. With Python 2.7.5, I get:
> >  File "/tmp/lines3d_demo.py", line 2, in 
> >from mpl_toolkits.mplot3d import Axes3D
> >ImportError: No module named mpl_toolkits.mplot3d
> >
> > [[ snip snip ]]
> 
> I suspect this results from some aspect of your system; we routinely 
> build and test with python 2.7.x.  Maybe your python 2.7 setuptools 
> needs to be updated?

Most likely our fault. I rebuilt with setuptools-18.0.1 and that
didn't help. Looking at a Fedora 22 system,
matplotlib-1.4.3-py2.7-nspkg.pth is read, but not on our system. This
is the problem. If I move this file out of the way on the Fedora 22
system, the failure is the same as above. Just need to figure out how
Python reads this file.

-- 
albert chin (ch...@thewrittenword.com)

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Pull #2210 adding namespace package mpl_toolkits and Python 2.7

2015-07-14 Thread Albert Chin
On Tue, Jul 14, 2015 at 02:53:13PM -0500, Albert Chin wrote:
> On Tue, Jul 14, 2015 at 09:22:07AM -1000, Eric Firing wrote:
> > On 2015/07/14 3:59 AM, Albert Chin wrote:
> > > I've built matplotlib-1.4.3 with Python 2.7.5, 3.3.2, 3.4.3. Python
> > > 3.3.2 and 3.4.3 work ok. With Python 2.7.5, I get:
> > >  File "/tmp/lines3d_demo.py", line 2, in 
> > >from mpl_toolkits.mplot3d import Axes3D
> > >ImportError: No module named mpl_toolkits.mplot3d
> > >
> > > [[ snip snip ]]
> > 
> > I suspect this results from some aspect of your system; we routinely 
> > build and test with python 2.7.x.  Maybe your python 2.7 setuptools 
> > needs to be updated?
> 
> Most likely our fault. I rebuilt with setuptools-18.0.1 and that
> didn't help. Looking at a Fedora 22 system,
> matplotlib-1.4.3-py2.7-nspkg.pth is read, but not on our system. This
> is the problem. If I move this file out of the way on the Fedora 22
> system, the failure is the same as above. Just need to figure out how
> Python reads this file.

Ok, found the problem. Python only reads .pth files in the default
Python prefix (sys.prefix and sys.exec_prefix), not from any other
path in PYTHONPATH. I'll need to create sitecustomize.py to fix this.

-- 
albert chin (ch...@thewrittenword.com)

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel