Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MEP12 on load_converter.py #4932

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

Merged
merged 3 commits into from
Aug 17, 2015
Merged

MEP12 on load_converter.py #4932

merged 3 commits into from
Aug 17, 2015

Conversation

ericmjl
Copy link
Contributor

@ericmjl ericmjl commented Aug 15, 2015

No description provided.

@jenshnielsen jenshnielsen added the MEP: MEP12 gallery and examples improvements label Aug 16, 2015
import matplotlib.dates as mdates


# Note: matplotlib.dates doesn't have bytespdate2num.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused about this. My version of Matplotlib definitely has bytespdate2num

And it is in the main repository here https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/dates.py#L308

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let me try conda installing the latest MPL.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was added in February 0a24a56 so it wound be in any released version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very weird, I cannot make the import statements work, though. I get the error:

In [9]: import matplotlib.dates as mdate

In [10]: mdate.bytespdate2num()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-10-7c2709974f11> in <module>()
----> 1 mdate.bytespdate2num()

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

Any idea what's going on? Is the import statement not done correctly?

@jenshnielsen
Copy link
Member

Which version of Matplotlib are you using? You will need the master branch with a build from after February for this to work.

@ericmjl
Copy link
Contributor Author

ericmjl commented Aug 16, 2015

I'm on 1.4.3 right now.

@ericmjl
Copy link
Contributor Author

ericmjl commented Aug 16, 2015

Should I be doing a development install from master instead?

@jenshnielsen
Copy link
Member

Yes if you want to run this example locally you need to do that

@ericmjl
Copy link
Contributor Author

ericmjl commented Aug 16, 2015

Ok, on it.

@ericmjl
Copy link
Contributor Author

ericmjl commented Aug 16, 2015

Very interesting, @jenshnielsen, I am finding that with 1.4.3 installed, I still have issues with the import statements. Also, when I perform a local install from the repo directly:

python setup.py develop

I get the following messages:

IMPORTANT WARNING:
    pkg-config is not installed.
    matplotlib may not be able to find some of its dependencies
============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.5.dev1]
                python: yes [3.4.3 |Continuum Analytics, Inc.| (default, Mar
                        6 2015, 12:07:41)  [GCC 4.2.1 (Apple Inc. build
                        5577)]]
              platform: yes [darwin]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.9.2]
              dateutil: yes [using dateutil version 2.4.2]
                  pytz: yes [using pytz version 2015.4]
               tornado: yes [using tornado version 4.2.1]
             pyparsing: yes [using pyparsing version 2.0.3]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: no  [The C/C++ header for freetype2 (ft2build.h)
                        could not be found.  You may need to install the
                        development package.]
                   png: yes [version 1.6.17]
                 qhull: yes [pkg-config information for 'qhull' could not be
                        found. Using local copy.]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]
                 tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite. "setup.py test" will
                        automatically download it. Install nose 0.11.1 or
                        later to run matplotlib.test() / using
                        unittest.mock]
        toolkits_tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite. "setup.py test" will
                        automatically download it. Install nose 0.11.1 or
                        later to run matplotlib.test() / using
                        unittest.mock]

OPTIONAL BACKEND EXTENSIONS
                macosx: yes [installing, darwin]
                qt5agg: no  [PyQt5 not found]
                qt4agg: yes [installing, Qt: 4.8.6, PyQt: 4.8.6; PySide not
                        found]
               gtk3agg: no  [Requires pygobject to be installed.]
             gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]
                gtkagg: no  [Requires pygtk]
                 tkagg: yes [installing, version not identified]
                 wxagg: no  [requires wxPython]
                   gtk: no  [Requires pygtk]
                   agg: yes [installing]
                 cairo: no  [cairocffi or pycairo not found]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: yes [version 1.14]
           ghostscript: yes [version 9.10]
                 latex: yes [version 3.14159265]
               pdftops: no

============================================================================
                        * The following required packages can not be built:
                        * freetype

Cannot tell whether the installation was successful or not. Any ideas here? I am at a loss with this one.

@jenshnielsen
Copy link
Member

It is expected to not work with 1.4.3 the code was not added to the master branch before February this year.

To install Matplotlib from source you need to have pkg-config installed. On OSX i normally install it using homebrew but that really depends on how your machine is set up.

We really should have a Conda branch with a master build but unfortunately we don't have that at the moment.

I’m going to take it on faith that this works. In the short period of
time here, I wasn’t able to get it working on my local system.
jenshnielsen added a commit that referenced this pull request Aug 17, 2015
@jenshnielsen jenshnielsen merged commit 37f7df6 into matplotlib:master Aug 17, 2015
@ericmjl ericmjl deleted the mep12-load_converter.py branch August 17, 2015 13:23
@QuLogic QuLogic added this to the v1.5.0 milestone Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MEP: MEP12 gallery and examples improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants