Isotropix Forums

Clarisse 5 Python Configuration

General Discussion about Isotropix and CG related topics

Clarisse 5 Python Configuration

Unread postby dougjung » Fri May 28, 2021 6:00 am

Hi Team!

On MacOS Big Sur with it's standard install of Python 3.9.5, just installed Clarisse 5, but it doesn't open properly because unable to find python 3.

I understand from the post at: https://www.isotropix.com/docs/clarisse ... ion/mac-os that the clarisse.env configuration file allows a python 3 install to reside anywhere on disk, but even after editing the file to point to what seems to be the proper location, unable to get Clarisse 5 to open.

Updated local /Users/USERNAME/Library/Preferences/Isotropix/Clarisse/5.0/clarisse.env file looks like this:

Code: Select all
> cat /Users/USERNAME/Library/Preferences/Isotropix/Clarisse/5.0/clarisse.env
IX_PYTHON2HOME=/System/Library/Frameworks/Python.framework/Versions/2.7
IX_PYTHON2PATH=/System/Library/Frameworks/Python.framework/Versions/2.7/lib
IX_PYTHON3HOME=/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9
IX_PYTHON3PATH=/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib
ILISE_SERVER=:40500
IX_SHELF_CONFIG_FILE=$IX_PYTHON_API_PATH/shelves/shelf.cfg
IX_SHELF_SCRIPT_PATH=
IX_SHELF_ICON_PATH=
IX_MENU_CONFIG_FILE=$IX_PYTHON_API_PATH/menus/init_menus.py
IX_MENU_SCRIPT_PATH=
IX_MENU_ICON_PATH=
IX_RESOLUTION_PRESET=
CLARISSE_STARTUP_SCRIPT=


List the python3 directory above:

Code: Select all
> ll /usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9
total 7144
drwxr-xr-x   9 USERNAME  admin      288 May 21 22:42 .
drwxr-xr-x   4 USERNAME  admin      128 May 21 22:42 ..
lrwxr-xr-x   1 USERNAME  admin       17 May 21 22:42 Headers -> include/python3.9
-rwxr-xr-x   1 USERNAME  admin  3654636 May 21 22:42 Python
drwxr-xr-x   4 USERNAME  admin      128 May 21 22:42 Resources
drwxr-xr-x  14 USERNAME  admin      448 May 21 22:43 bin
drwxr-xr-x   3 USERNAME  admin       96 May 21 22:42 include
drwxr-xr-x   5 USERNAME  admin      160 May 21 22:42 lib
drwxr-xr-x   3 USERNAME  admin       96 May 21 22:42 share


The same python3 path above is included in current python3 sys.path such as:

Code: Select all
> python3
>>> import sys
>>> print(sys.path)
['', '/Users/USERNAME', '/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python39.zip', '/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9', '/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload', '/usr/local/lib/python3.9/site-packages']


Does it need to be python 3.7 or is it OK to use 3.9? I did also instal 3.7 via pyenv, and tried that location out similar to above, but it hasn't worked either.

Any thoughts / things to check much appreciated - Thank You!
Last edited by dougjung on Sun May 30, 2021 3:52 am, edited 1 time in total.
dougjung
 
Posts: 5
Joined: Sat Sep 13, 2014 8:02 pm

Re: Clarisse 5 Python Configuration Issue

Unread postby sam » Fri May 28, 2021 6:27 am

Hello there,

The officially supported macOS version is 10.12.
One thing that I don't understand is that you mention https://www.isotropix.com/docs/clarisse ... ion/mac-os

Did you carefully read it through and follow the step by step instructions?
Capture.PNG

I'm just saying that because you seem to have already missed a very important information of the document.
Sam Assadian
Isotropix
CEO/Founder
User avatar
sam
 
Posts: 1670
Joined: Fri Jan 25, 2013 11:33 pm

Re: Clarisse 5 Python Configuration Issue

Unread postby dougjung » Sat May 29, 2021 8:22 pm

Thanks for your prompt reply. Indeed, after multiple reads somehow I had misread that detail.

As I mentioned, however, I did guess that maybe 3.7 was actually required, and so I also tried a range of combinations with 3.7.10 installed via pyenv, and configured what I believe would be the proper paths to that install dir under IX_PYTHON3HOME, etc, but so far I get the same result.

I do see the suggested installation step and realize that is to a system root location. The reason I'd prefer to use a pyenv python install if possible, is to avoid impacting the root system python install.

I've updated local /Users/USERNAME/Library/Preferences/Isotropix/Clarisse/5.0/clarisse.env file looks like this:

Code: Select all
IX_PYTHON2HOME=/System/Library/Frameworks/Python.framework/Versions/2.7
IX_PYTHON2PATH=/System/Library/Frameworks/Python.framework/Versions/2.7/lib
IX_PYTHON3HOME=/Users/USERNAME/.pyenv/versions/3.7.10
IX_PYTHON3PATH=/Users/USERNAME/.pyenv/versions/3.7.10/lib/python3.7
ILISE_SERVER=:40500
IX_SHELF_CONFIG_FILE=$IX_PYTHON_API_PATH/shelves/shelf.cfg
IX_SHELF_SCRIPT_PATH=
IX_SHELF_ICON_PATH=
IX_MENU_CONFIG_FILE=$IX_PYTHON_API_PATH/menus/init_menus.py
IX_MENU_SCRIPT_PATH=
IX_MENU_ICON_PATH=
IX_RESOLUTION_PRESET=
CLARISSE_STARTUP_SCRIPT=


Where those local dirs look like this:

Code: Select all
> ll /Users/USERNAME/.pyenv/versions/3.7.10
drwxr-xr-x   8 USERNAME  staff  256 May 29 11:38 .
drwxr-xr-x   5 USERNAME  staff  160 May 29 11:38 ..
lrwxr-xr-x   1 USERNAME  staff   48 May 29 11:26 Python -> /Users/USERNAME/.pyenv/versions/3.7.10/bin/python3.7
drwxr-xr-x  27 USERNAME  staff  864 May 29 10:59 bin
drwxr-xr-x   3 USERNAME  staff   96 May 29 11:38 envs
drwxr-xr-x   3 USERNAME  staff   96 May 22 22:36 include
drwxr-xr-x   5 USERNAME  staff  160 May 22 22:36 lib
drwxr-xr-x   3 USERNAME  staff   96 May 22 22:36 share


Code: Select all
ll /Users/USERNAME/.pyenv/versions/3.7.10/lib/python3.7
total 9240
drwxr-xr-x  208 USERNAME  staff    6656 May 22 22:36 .
drwxr-xr-x    5 USERNAME  staff     160 May 22 22:36 ..
-rw-r--r--    1 USERNAME  staff   12781 May 22 22:35 LICENSE.txt
-rw-r--r--    1 USERNAME  staff    5101 May 22 22:35 __future__.py
-rw-r--r--    1 USERNAME  staff      64 May 22 22:35 __phello__.foo.py
drwxr-xr-x  518 USERNAME  staff   16576 May 22 22:36 __pycache__
-rw-r--r--    1 USERNAME  staff    1801 May 22 22:35 _bootlocale.py
-rw-r--r--    1 USERNAME  staff   26424 May 22 22:35 _collections_abc.py
-rw-r--r--    1 USERNAME  staff    8749 May 22 22:35 _compat_pickle.py
-rw-r--r--    1 USERNAME  staff    5340 May 22 22:35 _compression.py
-rw-r--r--    1 USERNAME  staff    6027 May 22 22:35 _dummy_thread.py
-rw-r--r--    1 USERNAME  staff   14598 May 22 22:35 _markupbase.py
-rw-r--r--    1 USERNAME  staff   19600 May 22 22:35 _osx_support.py
-rw-r--r--    1 USERNAME  staff    6186 May 22 22:35 _py_abc.py
-rw-r--r--    1 USERNAME  staff  228690 May 22 22:35 _pydecimal.py
-rw-r--r--    1 USERNAME  staff   91616 May 22 22:35 _pyio.py
-rw-r--r--    1 USERNAME  staff    3115 May 22 22:35 _sitebuiltins.py
-rw-r--r--    1 USERNAME  staff   25504 May 22 22:35 _strptime.py
-rw-r--r--    1 USERNAME  staff   28936 May 22 22:35 _sysconfigdata_m_darwin_darwin.py
-rw-r--r--    1 USERNAME  staff    7214 May 22 22:35 _threading_local.py
-rw-r--r--    1 USERNAME  staff    5679 May 22 22:35 _weakrefset.py
-rw-r--r--    1 USERNAME  staff    5580 May 22 22:35 abc.py
-rw-r--r--    1 USERNAME  staff   32814 May 22 22:35 aifc.py
-rw-r--r--    1 USERNAME  staff     477 May 22 22:35 antigravity.py
-rw-r--r--    1 USERNAME  staff   95372 May 22 22:35 argparse.py
...


In the HOME dir above note that I added a Python symlink, pointing to the binary in bin:

Code: Select all
> ll /Users/USERNAME/.pyenv/versions/3.7.10/bin
drwxr-xr-x  27 USERNAME  staff      864 May 29 10:59 .
drwxr-xr-x   8 USERNAME  staff      256 May 29 11:38 ..
lrwxr-xr-x   1 USERNAME  staff        8 May 22 22:36 2to3 -> 2to3-3.7
-rwxr-xr-x   1 USERNAME  staff      125 May 22 22:36 2to3-3.7
lrwxr-xr-x   1 USERNAME  staff       16 May 22 22:36 easy_install -> easy_install-3.7
-rwxr-xr-x   1 USERNAME  staff      262 May 22 22:36 easy_install-3.7
lrwxr-xr-x   1 USERNAME  staff        7 May 22 22:36 idle -> idle3.7
lrwxr-xr-x   1 USERNAME  staff        7 May 22 22:36 idle3 -> idle3.7
-rwxr-xr-x   1 USERNAME  staff      123 May 22 22:36 idle3.7
lrwxr-xr-x   1 USERNAME  staff        6 May 22 22:36 pip -> pip3.7
-rwxr-xr-x   1 USERNAME  staff      253 May 22 22:36 pip3
-rwxr-xr-x   1 USERNAME  staff      253 May 22 22:36 pip3.7
lrwxr-xr-x   1 USERNAME  staff        8 May 22 22:36 pydoc -> pydoc3.7
lrwxr-xr-x   1 USERNAME  staff        8 May 22 22:36 pydoc3 -> pydoc3.7
-rwxr-xr-x   1 USERNAME  staff      108 May 22 22:36 pydoc3.7
lrwxr-xr-x   1 USERNAME  staff        9 May 22 22:36 python -> python3.7
lrwxr-xr-x   1 USERNAME  staff       16 May 22 22:36 python-config -> python3.7-config
lrwxr-xr-x   1 USERNAME  staff        9 May 22 22:36 python3 -> python3.7
lrwxr-xr-x   1 USERNAME  staff       16 May 22 22:36 python3-config -> python3.7-config
-rwxr-xr-x   2 USERNAME  staff  3293008 May 22 22:35 python3.7
lrwxr-xr-x   1 USERNAME  staff       17 May 22 22:36 python3.7-config -> python3.7m-config
-rwxr-xr-x   1 USERNAME  staff    65409 May 22 22:36 python3.7-gdb.py
-rwxr-xr-x   2 USERNAME  staff  3293008 May 22 22:35 python3.7m
-rwxr-xr-x   1 USERNAME  staff     1959 May 22 22:36 python3.7m-config
lrwxr-xr-x   1 USERNAME  staff       10 May 22 22:36 pyvenv -> pyvenv-3.7
-rwxr-xr-x   1 USERNAME  staff      465 May 22 22:36 pyvenv-3.7
-rwxr-xr-x   1 USERNAME  staff      270 May 29 10:59 virtualenv


This has been my best attempt using the 3.7.10 pyenv install, however it still yields the same when launching Clarissa 5.
I do note this output when trying to launch Clarissa in a shell:
Code: Select all
> /Applications/Isotropix/Clarisse\ 5.0/clarisse.app/Contents/MacOS/clarisse

warning: OptiX features (GPU Accelerated 3D View and Denoiser) are disabled: the current GPU configuration does not support NVIDIA OptiX. Please update your drivers or install a compatible NVIDIA GPU.
error: Failed to load library "/Applications/Isotropix/Clarisse 5.0/clarisse.app/Contents/MacOS/python3/scripting_module/scripting_python3.dylib". Error: dlopen(/Applications/Isotropix/Clarisse 5.0/clarisse.app/Contents/MacOS/python3/scripting_module/scripting_python3.dylib, 2): Library not loaded: /Library/Frameworks/Python.framework/Versions/3.7/Python
Referenced from: /Applications/Isotropix/Clarisse 5.0/clarisse.app/Contents/MacOS/python3/scripting_module/scripting_python3.dylib
Reason: image not found
error: OfClassFactory.add_module: failed to load DSO file '/Applications/Isotropix/Clarisse 5.0/clarisse.app/Contents/MacOS/python3/scripting_module/scripting_python3.dylib'.
error: Scripting engine class 'ScriptingPython3' not found. The class name is unknown or the associated module is not loaded.
error: Failed to initialize the Python Scripting engine.

Does that mean that I've done something wrong in my configuration file and somehow it is not being picked up? Or, is the Python installation expected to be in /Library/Frameworks/Python.framework/Versions/3.7 rather than the directory I configured?

Hopefully I am not just overlooking another detail.

Any further insight is much appreciated - thank you!
dougjung
 
Posts: 5
Joined: Sat Sep 13, 2014 8:02 pm

Re: Clarisse 5 Python Configuration

Unread postby anemoff » Mon May 31, 2021 10:30 am

Hi,

It's possible that the python library dependency issue is a problem on our side. It seems that our Python Scripting Module (scripting_python3.dylib) has the Python library path hardcoded in its dependencies, but it shouldn't.
We'll take a look and keep you posted.
Anthony Nemoff
Isotropix
R&D Engineer
User avatar
anemoff
 
Posts: 386
Joined: Wed Jan 13, 2016 10:10 am

Re: Clarisse 5 Python Configuration

Unread postby anemoff » Tue Jun 01, 2021 1:44 pm

Have you tried adding your Python's pyenv path to your DYLD_LIBRARY_PATHG?
For example, in your .bashrc file:
Code: Select all
export DYLD_LIBRARY_PATH=/Users/USERNAME/.pyenv/versions/3.7.10:$DYLD_LIBRARY_PATH
Anthony Nemoff
Isotropix
R&D Engineer
User avatar
anemoff
 
Posts: 386
Joined: Wed Jan 13, 2016 10:10 am

Re: Clarisse 5 Python Configuration

Unread postby dougjung » Fri Jun 04, 2021 6:06 am

Hi Anthony

Thanks for the note, adding to $DYLD_LIBRARY_PATH did make it launch with my pyenv install, which I can verify in the script editor.

Interestingly, I added that to a single shell, and launched Clarisse from that shell, which worked. Then today I launched like I'd typically do from the spotlight search, and did not have that var set, and it still launched fine. It made me curious if maybe there is a pref that might now be stored?

Thanks again Sam and Anthony for your help - excited to check out the new features of Clarisse 5!
Kind regards,
Doug
dougjung
 
Posts: 5
Joined: Sat Sep 13, 2014 8:02 pm

Re: Clarisse 5 Python Configuration

Unread postby anemoff » Fri Jun 04, 2021 9:50 am

Glad it worked.

But, like you, I'm also surprised that DYLD_LIBRARY_PATH modification was somehow persistent.
The 'export' statement is supposed to affect only the current shell and its child processes.
To check if the modification is available in other shells, simply open a new shell and run the following and check if your pyenv path is there:
Code: Select all
echo $DYLD_LIBRARY_PATH

You could also run Clarisse from Spotlight search, then open the Variable Editor, go to the System tab, and check for the value of DYLD_LIBRARY_PATH.

To make sure the DYLD_LIBRARY_PATH modification is persistent you can edit your .bashrc, or .zshrc if you're usign zsh, (located in your $HOME folder), and add the same line that used in the previous post. But it would affect all processes.

Another solution is to edit the following shell scripts, in clarisse.app/Contents/MacOS, to fix DYLD_LIBRARY_PATH:
- cdenoise (ignore if you don't have a NVIDIA GPU)
- clarisse
- cnode
- crcache
- licman

Cheers,
Anthony Nemoff
Isotropix
R&D Engineer
User avatar
anemoff
 
Posts: 386
Joined: Wed Jan 13, 2016 10:10 am


Return to General Discussion