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

ImportError: Python is not installed as a framework. #114

Closed
tweak-wtf opened this issue Feb 18, 2019 · 4 comments
Closed

ImportError: Python is not installed as a framework. #114

tweak-wtf opened this issue Feb 18, 2019 · 4 comments
Labels
waiting for answer Further information is requested

Comments

@tweak-wtf
Copy link

Hey people,
I´ve followed your instructions for installing ludwig manually.
Unfortunately when I try to run the binary i get an error message telling me that python isn´t installed as a framework.
Here is the stack trace I get...

Traceback (most recent call last):
  File "/Users/tweak/Documents/code/ludwig/venv/bin/ludwig", line 11, in <module>
    load_entry_point('ludwig==0.1.0', 'console_scripts', 'ludwig')()
  File "/Users/tweak/Documents/code/ludwig/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/tweak/Documents/code/ludwig/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/Users/tweak/Documents/code/ludwig/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/Users/tweak/Documents/code/ludwig/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/tweak/Documents/code/ludwig/venv/lib/python3.6/site-packages/ludwig-0.1.0-py3.6.egg/ludwig/__init__.py", line 17, in <module>
  File "/Users/tweak/Documents/code/ludwig/venv/lib/python3.6/site-packages/ludwig-0.1.0-py3.6.egg/ludwig/cli.py", line 24, in <module>
  File "/Users/tweak/Documents/code/ludwig/venv/lib/python3.6/site-packages/ludwig-0.1.0-py3.6.egg/ludwig/visualize.py", line 32, in <module>
  File "/Users/tweak/Documents/code/ludwig/venv/lib/python3.6/site-packages/ludwig-0.1.0-py3.6.egg/ludwig/utils/visualization_utils.py", line 28, in <module>
  File "/Users/tweak/Documents/code/ludwig/venv/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2374, in <module>
    switch_backend(rcParams["backend"])
  File "/Users/tweak/Documents/code/ludwig/venv/lib/python3.6/site-packages/matplotlib/pyplot.py", line 207, in switch_backend
    backend_mod = importlib.import_module(backend_name)
  File "/Users/tweak/Documents/code/ludwig/venv/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/Users/tweak/Documents/code/ludwig/venv/lib/python3.6/site-packages/matplotlib/backends/backend_macosx.py", line 14, in <module>
    from matplotlib.backends import _macosx
ImportError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.

I´m on macOS Mojave 10.14 running Python 3.6.5.
Maybe you know a fix for this?

Meanwhile I´ve just pip-installed ludwig in another venv which works like a charm.

@Sofwath
Copy link

Sofwath commented Feb 18, 2019

try :
conda install matplotlib

@tweak-wtf
Copy link
Author

will try, thanks!
But I already pip-install all requirements. so matplotlib is already installed at version 3.0.2

@w4nderlust
Copy link
Collaborator

Hi @tony-dorfmeister , this issue should not exist in matplotlib >= 3.0. Anyway, I also pushed a fix that should solve it also for older versions of matplotlib. Can you please try again using the latest version of Ludwig on master?

@w4nderlust w4nderlust added the waiting for answer Further information is requested label Feb 20, 2019
@tweak-wtf
Copy link
Author

Works like a charm. Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for answer Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants