Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate matplotlib matplot_dep to Python 3.4 #252

Closed
finmod opened this issue Sep 15, 2015 · 29 comments
Closed

Migrate matplotlib matplot_dep to Python 3.4 #252

finmod opened this issue Sep 15, 2015 · 29 comments

Comments

@finmod
Copy link

finmod commented Sep 15, 2015

See open issue in notebook, SheffieldML/notebook#5

The trace in GPy.devel in running coregionalisation.ipnb is:

ImportError Traceback (most recent call last)
in ()
6 m.optimize()
7 print (m)
----> 8 plot_2outputs(m,xlim=(0,100),ylim=(-20,60))

in plot_2outputs(m, xlim, ylim)
5 ax1.set_xlim(xlim)
6 ax1.set_title('Output 1')
----> 7 m.plot(plot_limits=xlim,fixed_inputs=[(1,0)],which_data_rows=slice(0,100),ax=ax1)
8 ax1.plot(Xt1[:,:1],Yt1,'rx',mew=1.5)
9 #Output 2

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\core\gp.py in plot(self, plot_limits, which_data_rows, which_data_ycols, fixed_inputs, levels, samples, fignum, ax, resolution, plot_raw, linecol, fillcol, Y_metadata, data_symbol, predict_kw, plot_training_data, samples_y, apply_link)
583 """
584 assert "matplotlib" in sys.modules, "matplotlib package has not been imported."
--> 585 from ..plotting.matplot_dep import models_plots
586 kw = {}
587 if linecol is not None:

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\plotting\matplot_dep__init__.py in ()
2 # Licensed under the BSD 3-clause license (see LICENSE.txt)
3
----> 4 from . import base_plots
5 from . import models_plots
6 from . import priors_plots

ImportError: cannot import name 'base_plots'

@mzwiessele
Copy link
Member

How do you do imports in python 3.4, I am still a total noob in python 3 : )

@mikecroucher
Copy link
Member

You want fixes pushed to devel?
On 16 Sep 2015 15:07, "Max Zwiessele" notifications@github.com wrote:

How do you do imports in python 3.4, I am still a total noob in python 3 :
)


Reply to this email directly or view it on GitHub
#252 (comment).

@mzwiessele
Copy link
Member

Either direct push (to devel) or through pull requests. Master gets only updated, when I have looked at the crosscompiler (#250).

@lawrennd
Copy link
Member

I think Max deserves some form of (at least partial) immunity from the
Python 3 "swear box" ... it's unfair to apply it strictly to someone who
spent so long in "the merchant navy". But rest of us should have to chip in.

On Wed, Sep 16, 2015 at 3:19 PM, Max Zwiessele notifications@github.com
wrote:

Either direct push (to devel) or through pull requests. Master gets only
updated, when I have looked at the crosscompiler (#250
#250).


Reply to this email directly or view it on GitHub
#252 (comment).

@finmod
Copy link
Author

finmod commented Sep 17, 2015

Hints on migrating pylab to matplotlib from a novice to python(2.7 or 3.4) on conda 3.17:

-some guidelines on good syntax can be found here: https://github.com/jrjohansson/scientific-python-lectures/blob/master/Lecture-4-Matplotlib.ipynb https://github.com/jrjohansson/scientific-python-lectures/blob/master/Lecture-4-Matplotlib.ipynb

  •      “from pylab import *” or “ from pylab import as pb” are replaced by the THREE lines: 
    

o Import matplotlib

o Import matplotlib.pyplot as plt

o Import numpy as np

  •      The syntax of the plot is modified to include “plt” instead of “pb” and
    
  •      “np” should be inserted in the math statements
    
  •      The complete folder and sub-folders of “GPy.plotting” should be converted along these lines
    

Hope this helps someone to take charge of updating GPy and notebook.

From: Neil Lawrence [mailto:notifications@github.com]
Sent: Wednesday, September 16, 2015 5:43 PM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

I think Max deserves some form of (at least partial) immunity from the
Python 3 "swear box" ... it's unfair to apply it strictly to someone who
spent so long in "the merchant navy". But rest of us should have to chip in.

On Wed, Sep 16, 2015 at 3:19 PM, Max Zwiessele <notifications@github.com mailto:notifications@github.com >
wrote:

Either direct push (to devel) or through pull requests. Master gets only
updated, when I have looked at the crosscompiler (#250
#250).


Reply to this email directly or view it on GitHub
#252 (comment).


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIq8UzXFDR0RjFWaG5fpGAdJ65T1mks5oyYVxgaJpZM4F9pS4.gif

@mzwiessele
Copy link
Member

I think I fixed this on the devel branch. Can someone double check please?

@finmod
Copy link
Author

finmod commented Oct 5, 2015

I have systematically checked the notebooks for conformity with:

%matplotlib inline

Import matplotlib

Import matplotlib.pyplot as plt

Import numpy as np

All the notebooks of GPy run smoothly after the usual print (m) and coherence of pb into plt with the exception of magnificationFactor.ipynb and sampling.ipynb

In magnification Factor at:

fig, axes = plt.subplots(1, 2, figsize=(15,5))

v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

axes[0].set_title('Latent Space')

v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

axes[1].set_title('Magnification')

produces this error:

NameError Traceback (most recent call last)

in ()

  1 fig, axes = plt.subplots(1, 2, figsize=(15,5))

----> 2 v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

  3 axes[0].set_title('Latent Space')

  4 v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

  5 axes[1].set_title('Magnification')

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\models\gplvm.py in plot_latent(self, labels, which_indices, resolution, ax, marker, s, fignum, legend, plot_limits, aspect, updates, **kwargs)

 82                 resolution, ax, marker, s,

 83                 fignum, False, legend,

---> 84 plot_limits, aspect, updates, **kwargs)

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\plotting\matplot_dep\dim_reduction_plots.py in plot_latent(model, labels, which_indices, resolution, ax, marker, s, fignum, plot_inducing, legend, plot_limits, aspect, updates, predict_kwargs, imshow_kwargs)

156             this_label = 'class %i' % ul

157         else:

--> 158 this_label = unicode(ul)

159         m = marker.next()

160 

NameError: name 'unicode' is not defined

In sampling.ipynb, plots(s) produces this error:


TypeError Traceback (most recent call last)

in ()

----> 1 plt(s)

TypeError: 'module' object is not callable

And a few others below on “name xrange is not defined”

Let me advocate the general use of this command in each notebook

%reload_ext version_information

%version_information conda, GPy, matplotlib, numpy

Out[10]:

Software

Version

Python

3.4.3 64bit [MSC v.1600 64 bit (AMD64)]

IPython

4.0.0

OS

Windows 8 6.2.9200

conda

3.18.1

GPy

0.8.8

matplotlib

1.4.3

numpy

1.9.3

Sat Oct 03 16:19:24 2015 South Africa Standard Time

Thanks.

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Wednesday, September 30, 2015 6:09 PM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

I think I fixed this on the devel branch. Can someone double check please?


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIrnQX-SVuaknPThC6zaAHgio1P7pks5o3ACEgaJpZM4F9pS4.gif

@mzwiessele
Copy link
Member

Great I am doing the refactoring right now.

Please have a look into the branch: plot_density

It is still work in progress, but I expect it to be done tonight or tomorrow.

It will also support multiple plotting libraries, which was the plan of the plotting module all along. If you don’t do everything yourself, no-one does ; )

On 5 Oct 2015, at 13:35, finmod notifications@github.com wrote:

I have systematically checked the notebooks for conformity with:

%matplotlib inline

Import matplotlib

Import matplotlib.pyplot as plt

Import numpy as np

All the notebooks of GPy run smoothly after the usual print (m) and coherence of pb into plt with the exception of magnificationFactor.ipynb and sampling.ipynb

In magnification Factor at:

fig, axes = plt.subplots(1, 2, figsize=(15,5))

v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

axes[0].set_title('Latent Space')

v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

axes[1].set_title('Magnification')

produces this error:

NameError Traceback (most recent call last)

in ()

1 fig, axes = plt.subplots(1, 2, figsize=(15,5))

----> 2 v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

3 axes[0].set_title('Latent Space')

4 v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

5 axes[1].set_title('Magnification')

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\models\gplvm.py in plot_latent(self, labels, which_indices, resolution, ax, marker, s, fignum, legend, plot_limits, aspect, updates, **kwargs)

82 resolution, ax, marker, s,

83 fignum, False, legend,

---> 84 plot_limits, aspect, updates, **kwargs)

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\plotting\matplot_dep\dim_reduction_plots.py in plot_latent(model, labels, which_indices, resolution, ax, marker, s, fignum, plot_inducing, legend, plot_limits, aspect, updates, predict_kwargs, imshow_kwargs)

156 this_label = 'class %i' % ul

157 else:

--> 158 this_label = unicode(ul)

159 m = marker.next()

160

NameError: name 'unicode' is not defined

In sampling.ipynb, plots(s) produces this error:


TypeError Traceback (most recent call last)

in ()

----> 1 plt(s)

TypeError: 'module' object is not callable

And a few others below on “name xrange is not defined”

Let me advocate the general use of this command in each notebook

%reload_ext version_information

%version_information conda, GPy, matplotlib, numpy

Out[10]:

Software

Version

Python

3.4.3 64bit [MSC v.1600 64 bit (AMD64)]

IPython

4.0.0

OS

Windows 8 6.2.9200

conda

3.18.1

GPy

0.8.8

matplotlib

1.4.3

numpy

1.9.3

Sat Oct 03 16:19:24 2015 South Africa Standard Time

Thanks.

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Wednesday, September 30, 2015 6:09 PM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

I think I fixed this on the devel branch. Can someone double check please?


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIrnQX-SVuaknPThC6zaAHgio1P7pks5o3ACEgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).

@finmod
Copy link
Author

finmod commented Oct 7, 2015

On installing plot_density, I get the following error.

Is “pypandoc” a module of GPy or some other package?

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

  File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 49, in read_to_rst

    import pypandoc

ImportError: No module named 'pypandoc'



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

  File "<string>", line 20, in <module>

  File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 132, in <module>

    long_description=read_to_rst('README.md'),

  File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 54, in read_to_rst

    return read(fname)

  File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 45, in read

    return open(os.path.join(os.path.dirname(__file__), fname)).read()

  File "C:\Users\Denis\Anaconda3\lib\encodings\cp1252.py", line 23, in decode

    return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2241: character maps to <undefined>



----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Monday, October 5, 2015 3:39 PM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

Great I am doing the refactoring right now.

Please have a look into the branch: plot_density

It is still work in progress, but I expect it to be done tonight or tomorrow.

It will also support multiple plotting libraries, which was the plan of the plotting module all along. If you don’t do everything yourself, no-one does ; )

On 5 Oct 2015, at 13:35, finmod <notifications@github.com mailto:notifications@github.com > wrote:

I have systematically checked the notebooks for conformity with:

%matplotlib inline

Import matplotlib

Import matplotlib.pyplot as plt

Import numpy as np

All the notebooks of GPy run smoothly after the usual print (m) and coherence of pb into plt with the exception of magnificationFactor.ipynb and sampling.ipynb

In magnification Factor at:

fig, axes = plt.subplots(1, 2, figsize=(15,5))

v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

axes[0].set_title('Latent Space')

v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

axes[1].set_title('Magnification')

produces this error:

NameError Traceback (most recent call last)

in ()

1 fig, axes = plt.subplots(1, 2, figsize=(15,5))

----> 2 v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

3 axes[0].set_title('Latent Space')

4 v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

5 axes[1].set_title('Magnification')

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\models\gplvm.py in plot_latent(self, labels, which_indices, resolution, ax, marker, s, fignum, legend, plot_limits, aspect, updates, **kwargs)

82 resolution, ax, marker, s,

83 fignum, False, legend,

---> 84 plot_limits, aspect, updates, **kwargs)

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\plotting\matplot_dep\dim_reduction_plots.py in plot_latent(model, labels, which_indices, resolution, ax, marker, s, fignum, plot_inducing, legend, plot_limits, aspect, updates, predict_kwargs, imshow_kwargs)

156 this_label = 'class %i' % ul

157 else:

--> 158 this_label = unicode(ul)

159 m = marker.next()

160

NameError: name 'unicode' is not defined

In sampling.ipynb, plots(s) produces this error:


TypeError Traceback (most recent call last)

in ()

----> 1 plt(s)

TypeError: 'module' object is not callable

And a few others below on “name xrange is not defined”

Let me advocate the general use of this command in each notebook

%reload_ext version_information

%version_information conda, GPy, matplotlib, numpy

Out[10]:

Software

Version

Python

3.4.3 64bit [MSC v.1600 64 bit (AMD64)]

IPython

4.0.0

OS

Windows 8 6.2.9200

conda

3.18.1

GPy

0.8.8

matplotlib

1.4.3

numpy

1.9.3

Sat Oct 03 16:19:24 2015 South Africa Standard Time

Thanks.

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Wednesday, September 30, 2015 6:09 PM
To: SheffieldML/GPy <GPy@noreply.github.com mailto:GPy@noreply.github.com >
Cc: finmod <denis.richard@dr.com mailto:denis.richard@dr.com >
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

I think I fixed this on the devel branch. Can someone double check please?


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIrnQX-SVuaknPThC6zaAHgio1P7pks5o3ACEgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIr-1BmtbPihl-pr7ZvLe5bLXmkEPks5o4mbMgaJpZM4F9pS4.gif

@mzwiessele
Copy link
Member

can you try it again?

On 7 Oct 2015, at 13:11, finmod notifications@github.com wrote:

On installing plot_density, I get the following error.

Is “pypandoc” a module of GPy or some other package?

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 49, in read_to_rst

import pypandoc

ImportError: No module named 'pypandoc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 20, in

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 132, in

long_description=read_to_rst('README.md'),

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 54, in read_to_rst

return read(fname)

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 45, in read

return open(os.path.join(os.path.dirname(file), fname)).read()

File "C:\Users\Denis\Anaconda3\lib\encodings\cp1252.py", line 23, in decode

return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2241: character maps to


Command "python setup.py egg_info" failed with error code 1 in C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Monday, October 5, 2015 3:39 PM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

Great I am doing the refactoring right now.

Please have a look into the branch: plot_density

It is still work in progress, but I expect it to be done tonight or tomorrow.

It will also support multiple plotting libraries, which was the plan of the plotting module all along. If you don’t do everything yourself, no-one does ; )

On 5 Oct 2015, at 13:35, finmod <notifications@github.com mailto:notifications@github.com > wrote:

I have systematically checked the notebooks for conformity with:

%matplotlib inline

Import matplotlib

Import matplotlib.pyplot as plt

Import numpy as np

All the notebooks of GPy run smoothly after the usual print (m) and coherence of pb into plt with the exception of magnificationFactor.ipynb and sampling.ipynb

In magnification Factor at:

fig, axes = plt.subplots(1, 2, figsize=(15,5))

v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

axes[0].set_title('Latent Space')

v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

axes[1].set_title('Magnification')

produces this error:

NameError Traceback (most recent call last)

in ()

1 fig, axes = plt.subplots(1, 2, figsize=(15,5))

----> 2 v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

3 axes[0].set_title('Latent Space')

4 v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

5 axes[1].set_title('Magnification')

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\models\gplvm.py in plot_latent(self, labels, which_indices, resolution, ax, marker, s, fignum, legend, plot_limits, aspect, updates, **kwargs)

82 resolution, ax, marker, s,

83 fignum, False, legend,

---> 84 plot_limits, aspect, updates, **kwargs)

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\plotting\matplot_dep\dim_reduction_plots.py in plot_latent(model, labels, which_indices, resolution, ax, marker, s, fignum, plot_inducing, legend, plot_limits, aspect, updates, predict_kwargs, imshow_kwargs)

156 this_label = 'class %i' % ul

157 else:

--> 158 this_label = unicode(ul)

159 m = marker.next()

160

NameError: name 'unicode' is not defined

In sampling.ipynb, plots(s) produces this error:


TypeError Traceback (most recent call last)

in ()

----> 1 plt(s)

TypeError: 'module' object is not callable

And a few others below on “name xrange is not defined”

Let me advocate the general use of this command in each notebook

%reload_ext version_information

%version_information conda, GPy, matplotlib, numpy

Out[10]:

Software

Version

Python

3.4.3 64bit [MSC v.1600 64 bit (AMD64)]

IPython

4.0.0

OS

Windows 8 6.2.9200

conda

3.18.1

GPy

0.8.8

matplotlib

1.4.3

numpy

1.9.3

Sat Oct 03 16:19:24 2015 South Africa Standard Time

Thanks.

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Wednesday, September 30, 2015 6:09 PM
To: SheffieldML/GPy <GPy@noreply.github.com mailto:GPy@noreply.github.com >
Cc: finmod <denis.richard@dr.com mailto:denis.richard@dr.com >
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

I think I fixed this on the devel branch. Can someone double check please?


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIrnQX-SVuaknPThC6zaAHgio1P7pks5o3ACEgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIr-1BmtbPihl-pr7ZvLe5bLXmkEPks5o4mbMgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).

@finmod
Copy link
Author

finmod commented Oct 7, 2015

Here it is. Pandoc does not pip install properly in py3.

!pip install --upgrade https://github.com/SheffieldML/GPy/archive/plot_density.zip

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

  File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 55, in read_to_rst

    import pypandoc

ImportError: No module named 'pypandoc'



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

  File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 47, in read

    return unicode(f.read())

NameError: name 'unicode' is not defined



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

  File "<string>", line 20, in <module>

  File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 138, in <module>

    long_description=read_to_rst('README.md'),

  File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 60, in read_to_rst

    return read(fname)

  File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 51, in read

    return (f.read())

  File "C:\Users\Denis\Anaconda3\lib\encodings\cp1252.py", line 23, in decode

    return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2241: character maps to <undefined>

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Wednesday, October 7, 2015 3:17 PM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

can you try it again?

On 7 Oct 2015, at 13:11, finmod <notifications@github.com mailto:notifications@github.com > wrote:

On installing plot_density, I get the following error.

Is “pypandoc” a module of GPy or some other package?

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 49, in read_to_rst

import pypandoc

ImportError: No module named 'pypandoc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 20, in

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 132, in

long_description=read_to_rst('README.md'),

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 54, in read_to_rst

return read(fname)

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 45, in read

return open(os.path.join(os.path.dirname(file), fname)).read()

File "C:\Users\Denis\Anaconda3\lib\encodings\cp1252.py", line 23, in decode

return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2241: character maps to


Command "python setup.py egg_info" failed with error code 1 in C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Monday, October 5, 2015 3:39 PM
To: SheffieldML/GPy <GPy@noreply.github.com mailto:GPy@noreply.github.com >
Cc: finmod <denis.richard@dr.com mailto:denis.richard@dr.com >
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

Great I am doing the refactoring right now.

Please have a look into the branch: plot_density

It is still work in progress, but I expect it to be done tonight or tomorrow.

It will also support multiple plotting libraries, which was the plan of the plotting module all along. If you don’t do everything yourself, no-one does ; )

On 5 Oct 2015, at 13:35, finmod <notifications@github.com mailto:notifications@github.com%20%3cmailto:notifications@github.com mailto:notifications@github.com > wrote:

I have systematically checked the notebooks for conformity with:

%matplotlib inline

Import matplotlib

Import matplotlib.pyplot as plt

Import numpy as np

All the notebooks of GPy run smoothly after the usual print (m) and coherence of pb into plt with the exception of magnificationFactor.ipynb and sampling.ipynb

In magnification Factor at:

fig, axes = plt.subplots(1, 2, figsize=(15,5))

v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

axes[0].set_title('Latent Space')

v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

axes[1].set_title('Magnification')

produces this error:

NameError Traceback (most recent call last)

in ()

1 fig, axes = plt.subplots(1, 2, figsize=(15,5))

----> 2 v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

3 axes[0].set_title('Latent Space')

4 v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

5 axes[1].set_title('Magnification')

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\models\gplvm.py in plot_latent(self, labels, which_indices, resolution, ax, marker, s, fignum, legend, plot_limits, aspect, updates, **kwargs)

82 resolution, ax, marker, s,

83 fignum, False, legend,

---> 84 plot_limits, aspect, updates, **kwargs)

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\plotting\matplot_dep\dim_reduction_plots.py in plot_latent(model, labels, which_indices, resolution, ax, marker, s, fignum, plot_inducing, legend, plot_limits, aspect, updates, predict_kwargs, imshow_kwargs)

156 this_label = 'class %i' % ul

157 else:

--> 158 this_label = unicode(ul)

159 m = marker.next()

160

NameError: name 'unicode' is not defined

In sampling.ipynb, plots(s) produces this error:


TypeError Traceback (most recent call last)

in ()

----> 1 plt(s)

TypeError: 'module' object is not callable

And a few others below on “name xrange is not defined”

Let me advocate the general use of this command in each notebook

%reload_ext version_information

%version_information conda, GPy, matplotlib, numpy

Out[10]:

Software

Version

Python

3.4.3 64bit [MSC v.1600 64 bit (AMD64)]

IPython

4.0.0

OS

Windows 8 6.2.9200

conda

3.18.1

GPy

0.8.8

matplotlib

1.4.3

numpy

1.9.3

Sat Oct 03 16:19:24 2015 South Africa Standard Time

Thanks.

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Wednesday, September 30, 2015 6:09 PM
To: SheffieldML/GPy <GPy@noreply.github.com mailto:GPy@noreply.github.com%20%3cmailto:GPy@noreply.github.com mailto:GPy@noreply.github.com >
Cc: finmod <denis.richard@dr.com mailto:denis.richard@dr.com%20%3cmailto:denis.richard@dr.com mailto:denis.richard@dr.com >
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

I think I fixed this on the devel branch. Can someone double check please?


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIrnQX-SVuaknPThC6zaAHgio1P7pks5o3ACEgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIr-1BmtbPihl-pr7ZvLe5bLXmkEPks5o4mbMgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIvpzwoSa_lhar4q944aLfJQRy0xPks5o5QTWgaJpZM4F9pS4.gif

@mzwiessele
Copy link
Member

ach goddamit, better now?

On 7 Oct 2015, at 13:27, finmod notifications@github.com wrote:

Here it is. Pandoc does not pip install properly in py3.

!pip install --upgrade https://github.com/SheffieldML/GPy/archive/plot_density.zip

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 55, in read_to_rst

import pypandoc

ImportError: No module named 'pypandoc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 47, in read

return unicode(f.read())

NameError: name 'unicode' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 20, in

File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 138, in

long_description=read_to_rst('README.md'),

File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 60, in read_to_rst

return read(fname)

File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 51, in read

return (f.read())

File "C:\Users\Denis\Anaconda3\lib\encodings\cp1252.py", line 23, in decode

return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2241: character maps to

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Wednesday, October 7, 2015 3:17 PM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

can you try it again?

On 7 Oct 2015, at 13:11, finmod <notifications@github.com mailto:notifications@github.com > wrote:

On installing plot_density, I get the following error.

Is “pypandoc” a module of GPy or some other package?

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 49, in read_to_rst

import pypandoc

ImportError: No module named 'pypandoc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 20, in

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 132, in

long_description=read_to_rst('README.md'),

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 54, in read_to_rst

return read(fname)

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 45, in read

return open(os.path.join(os.path.dirname(file), fname)).read()

File "C:\Users\Denis\Anaconda3\lib\encodings\cp1252.py", line 23, in decode

return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2241: character maps to


Command "python setup.py egg_info" failed with error code 1 in C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Monday, October 5, 2015 3:39 PM
To: SheffieldML/GPy <GPy@noreply.github.com mailto:GPy@noreply.github.com >
Cc: finmod <denis.richard@dr.com mailto:denis.richard@dr.com >
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

Great I am doing the refactoring right now.

Please have a look into the branch: plot_density

It is still work in progress, but I expect it to be done tonight or tomorrow.

It will also support multiple plotting libraries, which was the plan of the plotting module all along. If you don’t do everything yourself, no-one does ; )

On 5 Oct 2015, at 13:35, finmod <notifications@github.com mailto:notifications@github.com%20%3cmailto:notifications@github.com mailto:notifications@github.com > wrote:

I have systematically checked the notebooks for conformity with:

%matplotlib inline

Import matplotlib

Import matplotlib.pyplot as plt

Import numpy as np

All the notebooks of GPy run smoothly after the usual print (m) and coherence of pb into plt with the exception of magnificationFactor.ipynb and sampling.ipynb

In magnification Factor at:

fig, axes = plt.subplots(1, 2, figsize=(15,5))

v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

axes[0].set_title('Latent Space')

v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

axes[1].set_title('Magnification')

produces this error:

NameError Traceback (most recent call last)

in ()

1 fig, axes = plt.subplots(1, 2, figsize=(15,5))

----> 2 v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

3 axes[0].set_title('Latent Space')

4 v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

5 axes[1].set_title('Magnification')

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\models\gplvm.py in plot_latent(self, labels, which_indices, resolution, ax, marker, s, fignum, legend, plot_limits, aspect, updates, **kwargs)

82 resolution, ax, marker, s,

83 fignum, False, legend,

---> 84 plot_limits, aspect, updates, **kwargs)

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\plotting\matplot_dep\dim_reduction_plots.py in plot_latent(model, labels, which_indices, resolution, ax, marker, s, fignum, plot_inducing, legend, plot_limits, aspect, updates, predict_kwargs, imshow_kwargs)

156 this_label = 'class %i' % ul

157 else:

--> 158 this_label = unicode(ul)

159 m = marker.next()

160

NameError: name 'unicode' is not defined

In sampling.ipynb, plots(s) produces this error:


TypeError Traceback (most recent call last)

in ()

----> 1 plt(s)

TypeError: 'module' object is not callable

And a few others below on “name xrange is not defined”

Let me advocate the general use of this command in each notebook

%reload_ext version_information

%version_information conda, GPy, matplotlib, numpy

Out[10]:

Software

Version

Python

3.4.3 64bit [MSC v.1600 64 bit (AMD64)]

IPython

4.0.0

OS

Windows 8 6.2.9200

conda

3.18.1

GPy

0.8.8

matplotlib

1.4.3

numpy

1.9.3

Sat Oct 03 16:19:24 2015 South Africa Standard Time

Thanks.

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Wednesday, September 30, 2015 6:09 PM
To: SheffieldML/GPy <GPy@noreply.github.com mailto:GPy@noreply.github.com%20%3cmailto:GPy@noreply.github.com mailto:GPy@noreply.github.com >
Cc: finmod <denis.richard@dr.com mailto:denis.richard@dr.com%20%3cmailto:denis.richard@dr.com mailto:denis.richard@dr.com >
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

I think I fixed this on the devel branch. Can someone double check please?


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIrnQX-SVuaknPThC6zaAHgio1P7pks5o3ACEgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIr-1BmtbPihl-pr7ZvLe5bLXmkEPks5o4mbMgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIvpzwoSa_lhar4q944aLfJQRy0xPks5o5QTWgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).

@finmod
Copy link
Author

finmod commented Oct 7, 2015

One more time?

!pip install --upgrade https://github.com/SheffieldML/GPy/archive/plot_density.zip

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

  File "C:\Users\Denis\AppData\Local\Temp\pip-6nbu5pyj-build\setup.py", line 47, in read

    return unicode(f.read(), 'utf-8')

NameError: name 'unicode' is not defined



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

  File "<string>", line 20, in <module>

  File "C:\Users\Denis\AppData\Local\Temp\pip-6nbu5pyj-build\setup.py", line 63, in <module>

    exec(read('GPy/__version__.py'), version_dummy)

  File "C:\Users\Denis\AppData\Local\Temp\pip-6nbu5pyj-build\setup.py", line 51, in read

    return str(f.read(), 'utf-8')

TypeError: decoding str is not supported

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Wednesday, October 7, 2015 3:29 PM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

ach goddamit, better now?

On 7 Oct 2015, at 13:27, finmod <notifications@github.com mailto:notifications@github.com > wrote:

Here it is. Pandoc does not pip install properly in py3.

!pip install --upgrade https://github.com/SheffieldML/GPy/archive/plot_density.zip

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 55, in read_to_rst

import pypandoc

ImportError: No module named 'pypandoc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 47, in read

return unicode(f.read())

NameError: name 'unicode' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 20, in

File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 138, in

long_description=read_to_rst('README.md'),

File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 60, in read_to_rst

return read(fname)

File "C:\Users\Denis\AppData\Local\Temp\pip-2unwdqu0-build\setup.py", line 51, in read

return (f.read())

File "C:\Users\Denis\Anaconda3\lib\encodings\cp1252.py", line 23, in decode

return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2241: character maps to

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Wednesday, October 7, 2015 3:17 PM
To: SheffieldML/GPy <GPy@noreply.github.com mailto:GPy@noreply.github.com >
Cc: finmod <denis.richard@dr.com mailto:denis.richard@dr.com >
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

can you try it again?

On 7 Oct 2015, at 13:11, finmod <notifications@github.com mailto:notifications@github.com%20%3cmailto:notifications@github.com mailto:notifications@github.com > wrote:

On installing plot_density, I get the following error.

Is “pypandoc” a module of GPy or some other package?

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 49, in read_to_rst

import pypandoc

ImportError: No module named 'pypandoc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 20, in

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 132, in

long_description=read_to_rst('README.md'),

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 54, in read_to_rst

return read(fname)

File "C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build\setup.py", line 45, in read

return open(os.path.join(os.path.dirname(file), fname)).read()

File "C:\Users\Denis\Anaconda3\lib\encodings\cp1252.py", line 23, in decode

return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2241: character maps to


Command "python setup.py egg_info" failed with error code 1 in C:\Users\Denis\AppData\Local\Temp\pip-_kpjl1k2-build

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Monday, October 5, 2015 3:39 PM
To: SheffieldML/GPy <GPy@noreply.github.com mailto:GPy@noreply.github.com%20%3cmailto:GPy@noreply.github.com mailto:GPy@noreply.github.com >
Cc: finmod <denis.richard@dr.com mailto:denis.richard@dr.com%20%3cmailto:denis.richard@dr.com mailto:denis.richard@dr.com >
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

Great I am doing the refactoring right now.

Please have a look into the branch: plot_density

It is still work in progress, but I expect it to be done tonight or tomorrow.

It will also support multiple plotting libraries, which was the plan of the plotting module all along. If you don’t do everything yourself, no-one does ; )

On 5 Oct 2015, at 13:35, finmod <notifications@github.com mailto:notifications@github.com%20%3cmailto:notifications@github.com%20%3cmailto:notifications@github.com mailto:notifications@github.com%20%3cmailto:notifications@github.com mailto:notifications@github.com > wrote:

I have systematically checked the notebooks for conformity with:

%matplotlib inline

Import matplotlib

Import matplotlib.pyplot as plt

Import numpy as np

All the notebooks of GPy run smoothly after the usual print (m) and coherence of pb into plt with the exception of magnificationFactor.ipynb and sampling.ipynb

In magnification Factor at:

fig, axes = plt.subplots(1, 2, figsize=(15,5))

v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

axes[0].set_title('Latent Space')

v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

axes[1].set_title('Magnification')

produces this error:

NameError Traceback (most recent call last)

in ()

1 fig, axes = plt.subplots(1, 2, figsize=(15,5))

----> 2 v1 = m_gplvm.plot_latent(labels=labels, ax=axes[0], updates=False, resolution=100)

3 axes[0].set_title('Latent Space')

4 v2 = m_gplvm.plot_magnification(labels=labels, ax=axes[1], updates=False)

5 axes[1].set_title('Magnification')

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\models\gplvm.py in plot_latent(self, labels, which_indices, resolution, ax, marker, s, fignum, legend, plot_limits, aspect, updates, **kwargs)

82 resolution, ax, marker, s,

83 fignum, False, legend,

---> 84 plot_limits, aspect, updates, **kwargs)

C:\Users\Denis\Anaconda3\lib\site-packages\GPy\plotting\matplot_dep\dim_reduction_plots.py in plot_latent(model, labels, which_indices, resolution, ax, marker, s, fignum, plot_inducing, legend, plot_limits, aspect, updates, predict_kwargs, imshow_kwargs)

156 this_label = 'class %i' % ul

157 else:

--> 158 this_label = unicode(ul)

159 m = marker.next()

160

NameError: name 'unicode' is not defined

In sampling.ipynb, plots(s) produces this error:


TypeError Traceback (most recent call last)

in ()

----> 1 plt(s)

TypeError: 'module' object is not callable

And a few others below on “name xrange is not defined”

Let me advocate the general use of this command in each notebook

%reload_ext version_information

%version_information conda, GPy, matplotlib, numpy

Out[10]:

Software

Version

Python

3.4.3 64bit [MSC v.1600 64 bit (AMD64)]

IPython

4.0.0

OS

Windows 8 6.2.9200

conda

3.18.1

GPy

0.8.8

matplotlib

1.4.3

numpy

1.9.3

Sat Oct 03 16:19:24 2015 South Africa Standard Time

Thanks.

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Wednesday, September 30, 2015 6:09 PM
To: SheffieldML/GPy <GPy@noreply.github.com mailto:GPy@noreply.github.com%20%3cmailto:GPy@noreply.github.com%20%3cmailto:GPy@noreply.github.com mailto:GPy@noreply.github.com%20%3cmailto:GPy@noreply.github.com mailto:GPy@noreply.github.com >
Cc: finmod <denis.richard@dr.com mailto:denis.richard@dr.com%20%3cmailto:denis.richard@dr.com%20%3cmailto:denis.richard@dr.com mailto:denis.richard@dr.com%20%3cmailto:denis.richard@dr.com mailto:denis.richard@dr.com >
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

I think I fixed this on the devel branch. Can someone double check please?


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIrnQX-SVuaknPThC6zaAHgio1P7pks5o3ACEgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIr-1BmtbPihl-pr7ZvLe5bLXmkEPks5o4mbMgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIvpzwoSa_lhar4q944aLfJQRy0xPks5o5QTWgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIg9Ta36aKPnK9jZ0dUK0IAPs6WZTks5o5QeYgaJpZM4F9pS4.gif

@mzwiessele mzwiessele added this to the GPy 0.8.10 milestone Oct 9, 2015
@vote539
Copy link

vote539 commented Oct 12, 2015

I am also having this issue and can reproduce the error messages mzwiessele posted above.

@mzwiessele
Copy link
Member

We have a patch waiting in the branch plot_density!

If you guys can check that out again, that would be great!

There is still work left to do, but basic plotting works for matplotlib and plotting (see config file)

Am 12.10.2015 um 03:51 schrieb vote539 notifications@github.com:

I am also having this issue and can reproduce the error messages mzwiessele posted above.


Reply to this email directly or view it on GitHub.

@finmod
Copy link
Author

finmod commented Oct 12, 2015

Max,

As before in Python 3.4, plot_density does not install properly because pandoc pypandoc dependencies do not install correctly.

The message is:

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

  File "C:\Users\Denis\AppData\Local\Temp\pip-izkplg2a-build\setup.py", line 55, in read_to_rst

    import pypandoc

ImportError: No module named 'pypandoc'



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

  File "C:\Users\Denis\AppData\Local\Temp\pip-izkplg2a-build\setup.py", line 47, in read

    return unicode(f.read(), 'utf-8')

NameError: name 'unicode' is not defined



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

  File "<string>", line 20, in <module>

  File "C:\Users\Denis\AppData\Local\Temp\pip-izkplg2a-build\setup.py", line 140, in <module>

    long_description=read_to_rst('README.md'),

  File "C:\Users\Denis\AppData\Local\Temp\pip-izkplg2a-build\setup.py", line 61, in read_to_rst

    return read(fname)

  File "C:\Users\Denis\AppData\Local\Temp\pip-izkplg2a-build\setup.py", line 51, in read

    return f.read()

  File "C:\Users\Denis\Anaconda3\lib\encodings\cp1252.py", line 23, in decode

    return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 1987: character maps to <undefined>



----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Denis\AppData\Local\Temp\pip-izkplg2a-build

As before my config is:

Software Version

Python 3.4.3 64bit [MSC v.1600 64 bit (AMD64)]

IPython 4.0.0

OS Windows 8 6.2.9200

numpy 1.9.3

scipy 0.16.0

matplotlib 1.4.3

sympy 0.7.6.1

quantecon 0.2.2

GPy 0.8.8

climin pre-0.1

version_information 1.0.3

Mon Oct 12 10:41:19 2015 Turkey Daylight Time

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Monday, October 12, 2015 10:19 AM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

We have a patch waiting in the branch plot_density!

If you guys can check that out again, that would be great!

There is still work left to do, but basic plotting works for matplotlib and plotting (see config file)

Am 12.10.2015 um 03:51 schrieb vote539 <notifications@github.com mailto:notifications@github.com >:

I am also having this issue and can reproduce the error messages mzwiessele posted above.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyImnTSf4rmzxPJtQuxGCb_oENJf2oks5o61ZfgaJpZM4F9pS4.gif

@mzwiessele
Copy link
Member

pandoc is not a dependency. It is only for generating the pypi rst readme.

It seems, that the exception occurs in f.read(), while reading the readme. there is unicode characters in the readme, that is why it breaks down.

I have written a patch using the codecs module, maybe that knows how to handle windows.

Can you try it again?

@mzwiessele
Copy link
Member

Sry merge issues, the patch is now out.

@finmod
Copy link
Author

finmod commented Oct 12, 2015

Almost there.

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

  File "<string>", line 20, in <module>

  File "C:\Users\Denis\AppData\Local\Temp\pip-atnr396i-build\setup.py", line 60, in <module>

    exec(read('GPy/__version__.py'), version_dummy)

  File "<string>", line 3

    A Gaussian processes framework in Python.

             ^

SyntaxError: invalid syntax



----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Denis\AppData\Local\Temp\pip-atnr396i-build

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Monday, October 12, 2015 10:54 AM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

Sry merge issues, the patch is now out.


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIrXy57EGUDI7i90fWErEyk6i_U5Xks5o616xgaJpZM4F9pS4.gif

@mzwiessele
Copy link
Member

Just fixed that one as well : )

On 12 Oct 2015, at 09:01, finmod notifications@github.com wrote:

Almost there.

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

File "", line 20, in

File "C:\Users\Denis\AppData\Local\Temp\pip-atnr396i-build\setup.py", line 60, in

exec(read('GPy/version.py'), version_dummy)

File "", line 3

A Gaussian processes framework in Python.

^

SyntaxError: invalid syntax


Command "python setup.py egg_info" failed with error code 1 in C:\Users\Denis\AppData\Local\Temp\pip-atnr396i-build

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Monday, October 12, 2015 10:54 AM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

Sry merge issues, the patch is now out.


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIrXy57EGUDI7i90fWErEyk6i_U5Xks5o616xgaJpZM4F9pS4.gif


Reply to this email directly or view it on GitHub #252 (comment).

@mzwiessele
Copy link
Member

It looks promising?

@finmod
Copy link
Author

finmod commented Oct 12, 2015

One more step…..

Collecting https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip

Downloading https://github.com/SheffieldML/GPy/archive/plot_density.zip https://github.com/SheffieldML/GPy/archive/plot_density.zip (1.3MB)

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

  File "<string>", line 20, in <module>

  File "C:\Users\Denis\AppData\Local\Temp\pip-3cflln_n-build\setup.py", line 79, in <module>

    include_dirs=[np.get_include(),'.'],

AttributeError: 'module' object has no attribute 'get_include'



----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Denis\AppData\Local\Temp\pip-3cflln_n-build

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Monday, October 12, 2015 11:25 AM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

It looks promising?


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyInN_7Pt95EIaqmW_vr459V_uu94bks5o62XagaJpZM4F9pS4.gif

@mzwiessele
Copy link
Member

This I have never ever seen before. Have you got the newest version of numpy?

In order to use the c libraries you will also need a compiler (e.g. mingw or visual) for this branch, as there are no build distros of this yet (it is in development :)

@mzwiessele
Copy link
Member

When using conda try

conda update numpy

Does that update?

@mzwiessele
Copy link
Member

It does run on travis and on my local machine.

So now it is windows related problems, and I do not have a windows machine at ease : (

We gonna have to find a solution for this together, I'm afraid.

@finmod
Copy link
Author

finmod commented Oct 12, 2015

This is always the latest version.

My config is:

Software Version

Python 3.4.3 64bit [MSC v.1600 64 bit (AMD64)]

IPython 4.0.0

OS Windows 8 6.2.9200

numpy 1.9.3

scipy 0.16.0

matplotlib 1.4.3

sympy 0.7.6.1

quantecon 0.2.2

GPy 0.8.8

climin pre-0.1

version_information 1.0.3

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Monday, October 12, 2015 11:44 AM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

When using conda try

conda update numpy

Does that update?


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIlU4DiLjxfWsPFUdRK0CIVY2ry8jks5o62pqgaJpZM4F9pS4.gif

@finmod
Copy link
Author

finmod commented Oct 12, 2015

If this works to your satisfaction on travis and your local machine, can you pls merge with devel branch as the matplotlib issue can be considered solved.

The issue on windows and the possible use of c compiler will have to wait a few more days. Visual Studio, c and f compilers have been a nightmare on windows for years. However, there is light at the end of the tunnel: Continuum Anaconda will be releasing shortly Anaconda 2.4 with Python 3.5 as standard. In turn py3.5 meshes smoothly with Visual Studio Community 2015 as reported here: http://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/ http://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/ This would make windows finally comparable to linux in terms of efficiency.

Another route is to wean GPy master and GPy devel from cython and move to numba and numbaPro. The demo notebooks on this score appear to favour the use of numba and jit instead of the cython approach.

Thank you.

From: Max Zwiessele [mailto:notifications@github.com]
Sent: Monday, October 12, 2015 11:46 AM
To: SheffieldML/GPy GPy@noreply.github.com
Cc: finmod denis.richard@dr.com
Subject: Re: [GPy] Migrate matplotlib matplot_dep to Python 3.4 (#252)

It does run on travis and on my local machine.

So now it is windows related problems, and I do not have a windows machine at ease : (

We gonna have to find a solution for this together, I'm afraid.


Reply to this email directly or view it on GitHub #252 (comment) . https://github.com/notifications/beacon/AMHyIr3BlgND-vQ0z5jcR-M9wzBsg1mVks5o62rCgaJpZM4F9pS4.gif

@Dapid
Copy link
Contributor

Dapid commented Oct 12, 2015

Numba is still too unstable to be used in library code (features coming in and out, bugs... require keeping up with conda's development), and requires a specific version of LLVM, which means you are practically tied to Conda..

@mzwiessele
Copy link
Member

Fixed by #262.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants