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

Daily build fails at "import matplotlib.pyplot as plt" #3568

Closed
tobias47n9e opened this issue Sep 25, 2014 · 9 comments
Closed

Daily build fails at "import matplotlib.pyplot as plt" #3568

tobias47n9e opened this issue Sep 25, 2014 · 9 comments
Milestone

Comments

@tobias47n9e
Copy link
Contributor

I currently get an error when running "import matplotlib.pyplot as plt". Can't really track down the cause.

In Python 2:

Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 28, in <module>
    from matplotlib import style
  File "/usr/lib/pymodules/python2.7/matplotlib/style/__init__.py", line 3, in <module>
    from .core import use, context, available, library, reload_library
  File "/usr/lib/pymodules/python2.7/matplotlib/style/core.py", line 149, in <module>
    _base_library = load_base_library()
  File "/usr/lib/pymodules/python2.7/matplotlib/style/core.py", line 94, in load_base_library
    library.update(read_style_directory(BASE_LIBRARY_PATH))
  File "/usr/lib/pymodules/python2.7/matplotlib/style/core.py", line 126, in read_style_directory
    for path, name in iter_style_files(style_dir):
  File "/usr/lib/pymodules/python2.7/matplotlib/style/core.py", line 115, in iter_style_files
    for path in os.listdir(style_dir):
OSError: [Errno 2] No such file or directory: '/usr/share/matplotlib/mpl-data/stylelib'

In Python 3:

Python 3.4.0 (default, Apr 11 2014, 13:05:11) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 28, in <module>
    from matplotlib import style
  File "/usr/lib/python3/dist-packages/matplotlib/style/__init__.py", line 3, in <module>
    from .core import use, context, available, library, reload_library
  File "/usr/lib/python3/dist-packages/matplotlib/style/core.py", line 149, in <module>
    _base_library = load_base_library()
  File "/usr/lib/python3/dist-packages/matplotlib/style/core.py", line 94, in load_base_library
    library.update(read_style_directory(BASE_LIBRARY_PATH))
  File "/usr/lib/python3/dist-packages/matplotlib/style/core.py", line 126, in read_style_directory
    for path, name in iter_style_files(style_dir):
  File "/usr/lib/python3/dist-packages/matplotlib/style/core.py", line 115, in iter_style_files
    for path in os.listdir(style_dir):
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/matplotlib/mpl-data/stylelib'
@pelson
Copy link
Member

pelson commented Sep 25, 2014

@tonysyu - obviously the stylelib folder isn't there - but I wouldn't expect it to have to be there. Any thoughts?

@tacaswell tacaswell added this to the v1.4.1 milestone Sep 25, 2014
@tacaswell
Copy link
Member

I suspect that this is related to the changes made to play nice with pyfreeze.

How did you install mpl? Is this from @takluyver 's ppa? The debian meta-data might need some updating.

@tobias47n9e
Copy link
Contributor Author

Yes I am using @takluyver 's ppa. Since adding it about a year ago I never changed anything anymore.

@takluyver
Copy link
Contributor

I'm happy to update that if it needs changes - I don't really pay much attention to it except when I get failure notifications. Or if someone else wants to update it, the packaging information is stored here:

https://code.launchpad.net/~takluyver/matplotlib/debian-daily

(You can make merge proposals, which are the LP equivalent of pull requests)

@tacaswell
Copy link
Member

Specifically, I suspect that #3390 is the source of the change that broke the daily build.

@tacaswell
Copy link
Member

I am going to close this as this is a downstream(?) problem.

@spiessbuerger Also make fully remove the current installation and try re-installing, some files got moved around, it is possible some deleted files got left behind and are now messing you up.

@takluyver
Copy link
Contributor

I've copied across a fix from the main Debian packaging: hopefully this will fix the problem when it rebuilds some time in the next 24 hours.

http://bazaar.launchpad.net/~takluyver/matplotlib/debian-daily/revision/33

@tobias47n9e
Copy link
Contributor Author

@takluyver , @tacaswell, @pelson - Everything works again. Thanks to all of you!

@takluyver
Copy link
Contributor

You're welcome. Thanks for bringing the issue to my attention. I don't
actually use the daily builds myself now, so I don't see issues like this.

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

No branches or pull requests

4 participants