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

wxpython 4.0.2 import fails on Mac: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.6/Python #892

Closed
kosiokarchev opened this Issue Jun 22, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@kosiokarchev
Copy link

kosiokarchev commented Jun 22, 2018

Version 4.0.2 cannot be imported in Python 3 on Mac, whereas version 4.0.1 works fine. This is the full traceback:

Python 3.6.5 (default, May 27 2018, 01:13:27) 
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/usr/local/lib/python3.6/site-packages/wx/core.py", line 12, in <module>
    from ._core import *
ImportError: dlopen(/usr/local/lib/python3.6/site-packages/wx/_core.cpython-36m-darwin.so, 2): Library not loaded: /Library/Frameworks/Python.framework/Versions/3.6/Python
  Referenced from: /usr/local/lib/python3.6/site-packages/wx/_core.cpython-36m-darwin.so
  Reason: no suitable image found.  Did find:
	/Library/Frameworks/Python.framework/Versions/3.6/Python: stat() failed with errno=20
	/Library/Frameworks/Python.framework/Versions/3.6/Python: stat() failed with errno=20

Operating system: MacOS High Sierra 10.13.5
wxPython version: 4.0.2
Stock or custom build: stock
Python version: 3.6.5
Stock or custom build: Homebrew Python

@RobinD42

This comment has been minimized.

Copy link
Member

RobinD42 commented Jun 22, 2018

Yes, this is known and a fix is being tested now. The new version of waf added an explicit link to the Python shared lib that wxPython was built with, causing problems at runtime if wx was imported into a non-stock Python.

See also: https://groups.google.com/d/msg/wxpython-dev/lNvdniiXhdY/jQHNJmtSCQAJ

@RobinD42

This comment has been minimized.

Copy link
Member

RobinD42 commented Jun 23, 2018

Fixed by #893

@RobinD42 RobinD42 closed this Jun 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.