Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Python Integration - Matplotlib Error (suggested fix does not work)

    I've seen this before, but the answer didn't work for me. I'm using Stata 16, and Python 3 under Anaconda on Windows. When I try running the example at:
    https://www.stata.com/new-in-stata/python-integration/, I get the standard error discussed: ""This application failed to start because it could not find or load the Qt platform plugin "windows" in ..."


    From https://www.statalist.org/forums/for...nnounced/page2
    posts #21 and #22, the suggested fix was:

    Code:
    import os
    os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = "C:\\ProgramData\\Anaconda3\\plugins"
    However, I don't have the 'plugins directory; in my installation there seems to be a very large number of 'plugins' folders under 'pkgs'.

    Does anybody have a fix for this?

    Thank you very much!
    Barry

  • #2
    Barry DeCicco

    The plugins/ folder is usually located within the Library/ folder. If this is true for your case, you can code

    Code:
    import os
    os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = "C:\\ProgramData\\Anaconda3\\Library\\plugins"

    Comment

    Working...
    X