I performed some attempts using lldb
.
First of all I am using Mac OS Sierra 10.12.6 on a 2013 Macbook Pro. All other apps works perfectly so I don’t think it’s the age.
This is the interesting part output of $ brew info python
. My Homebrew Python installation contains 2 versions, this is Python 3.
Python has been installed as
/usr/local/bin/python3
Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
/usr/local/opt/python/libexec/bin
If you need Homebrew's Python 2.7 run
brew install [email protected]
Pip, setuptools, and wheel have been installed. To update them run
pip3 install --upgrade pip setuptools wheel
You can install Python packages with
pip3 install <package>
They will install into the site-package directory
/usr/local/lib/python3.7/site-packages
Calling $ brew info [email protected]
I got the informations about the Python 2 installation with Homebrew that is the one currently active.
Pip and setuptools have been installed. To update them
pip install --upgrade pip setuptools
You can install Python packages with
pip install <package>
They will install into the site-package directory
/usr/local/lib/python2.7/site-packages
Some calls to understand install location of Python 2 and actual version number.
$ which python
/usr/local/bin/python
$ ls -lG $(which python)
lrwxr-xr-x 1 me admin 38 26 Giu 13:01 /usr/local/bin/python -> ../Cellar/[email protected]/2.7.15_1/bin/python
$ python --version
Python 2.7.15
First attempt to call appleseed with a PYTHONPATH I thought that was the correct one.
$ ls -G "/usr/local/Cellar/[email protected]/2.7.15_1/"
Frameworks INSTALL_RECEIPT.json Python Launcher.app bin libexec
IDLE.app LICENSE README lib share
$ export PYTHONHOME="/usr/local/Cellar/[email protected]/2.7.15_1"
$ lldb -f appleseed.cli -- --system
(lldb) target create "appleseed.cli"
ImportError: No module named site
Assertion failed: (e == 0), function ~recursive_mutex, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/libcxx/libcxx-307.5/src/mutex.cpp, line 86.
Stack dump:
0. HandleCommand(command = "target create "appleseed.cli"")
Abort trap: 6
$ pip install site
ImportError: No module named site
Second attempt to run appleseed. I think this is the correct path (and I don’t know if it is reachable from other symlinks around in the system).
$ export PYTHONHOME="/usr/local/Cellar/[email protected]/2.7.15_1/Frameworks/Python.framework/Versions/Current"
$ ./appleseed.cli --system
Illegal instruction: 4
$ lldb -f appleseed.cli -- --system
(lldb) target create "appleseed.cli"
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/local/Cellar/[email protected]/2.7.15_1/Frameworks/Python.framework/Versions/Current/lib/python2.7/copy.py", line 52, in <module>
import weakref
File "/usr/local/Cellar/[email protected]/2.7.15_1/Frameworks/Python.framework/Versions/Current/lib/python2.7/weakref.py", line 14, in <module>
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
Current executable set to 'appleseed.cli' (x86_64).
(lldb) settings set -- target.run-args "--system"
(lldb) run
Process 7566 launched: '/Applications/appleseed-1.8.1/bin/appleseed.cli' (x86_64)
Process 7566 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
frame #0: 0x0000000101bac671 libOpenImageIO.1.7.dylib`_GLOBAL__sub_I_formatspec.cpp + 45
libOpenImageIO.1.7.dylib`_GLOBAL__sub_I_formatspec.cpp:
-> 0x101bac671 <+45>: vpbroadcastq %xmm0, %xmm0
0x101bac676 <+50>: vmovdqu %xmm0, 0x54b94a(%rip) ; OpenImageIO::v1_7::pugi::impl::dummy_node_set + 24
0x101bac67e <+58>: movq 0x536b43(%rip), %rdi ; (void *)0x0000000101c25190: OpenImageIO::v1_7::pugi::xpath_node_set::~xpath_node_set()
0x101bac685 <+65>: leaq -0xf368c(%rip), %rdx
Target 0: (appleseed.cli) stopped.
(lldb)