Hey! I’ve been working on a plugin to run stable diffusion in TouchDesigner that uses an API and it’s been working fine on all versions except for the Apple Silicone version of TouchDesigner2022.3103 on an M1 (same with 1 build earlier).
I tried using the python requests library and get the error: “Can’t connect to HTTPS URL because the SSL module is not available”. Digging deeper I opened up a brand new project, went into the text port and ran import ssl and got “no such file”. Running import ssl on the intel version does work correctly.
I know I could just manually install the ssl library and add it to my path, but I’ve been doing a lot of workarounds to only use the python libraries that come pre-packed in TD so that people can start using the component right away without python experience. Any help would be greatly appreciated.
That’s interesting. I tested a clean install of TouchDesigner for Apple Silicone. The person who’s computer I ran it on isn’t a developer so they haven’t installed any developer tools or modified their path. I’ve had at least 3 people on an M1 run into this.
Is there any system info I can pass along, or tests that I can run?
I think I found something. It looks like TD’s python environment is searching for ssl through brew even though brew is not installed on the computer.
Here’s the error message I get on the computer when I run import ssl:
python >>> import ssl
ImportError: dlopen(/Applications/TouchDesigner.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_ssl.cpython-39-darwin.so, 0x0002): Library not loaded: /opt/homebrew/opt/openssl@1.1/lib/libssl.1.1.dylib
Referenced from: /Applications/TouchDesigner.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_ssl.cpython-39-darwin.so
Reason: tried: '/opt/homebrew/opt/openssl@1.1/lib/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file)
python >>>
When I run brew in the terminal I get this:
brew
zsh: command not found: brew
zsh isn’t installed either.
There’s no .bash_profile, .bashrc, or .zshrc on the computer either.
python >>> import ssl
ImportError: dlopen(/Applications/TouchDesigner-Experimental.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_ssl.cpython-39-darwin.so, 0x0002): Library not loaded: '/opt/homebrew/opt/openssl@1.1/lib/libssl.1.1.dylib'
Referenced from: '/Applications/TouchDesigner-Experimental.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_ssl.cpython-39-darwin.so'
Reason: tried: '/opt/homebrew/opt/openssl@1.1/lib/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file)
python >>> ssl
Traceback (most recent call last):
File "<Textport>", line 1
NameError: name 'ssl' is not defined
Mac M1 Pro 12.5.1
TD 2022.22650
Brew installed, and I’ve installed libssl1.1
Just updated TD to 2022.31030, same error when importing SSL. I also had an issue with my .zshrc but updated the path to point to libssl1.1 instead of libssh3, which I downgraded earlier to match the lib TD was trying to load.
This is very strange. There was an issue with that .so, but we fixed it last year. Can you .zip your TouchDesigner.app folder and share it with us (dropbox or something). You definitely should not need to install homebrew or do any path tricks to get this to work.
Had the same issue. Posting my details in case it helps improve future versions.(skip if you’re looking for a diff solution than the one mentioned above)
Mac M1 Max Laptop
TD v2022.31030
Issue started while running Monterey 12.3, upgraded to 12.6.3 with no improvement.
First Noticed the issue when trying to gather APIs for an Interactive HQ Tutorial.
Received error:
“urllib3.exceptions.SSLError: Can’t connect to HTTPS URL because the SSL module is not available.”
My project before this (which could have changed my clean new mac system) involved hooking up an Oak-D depth cam using Pycharms to make a Python3.10 Virtual Environment. Before encountering the SSL error I did turn on “Python 64-bit Module Path” in preferences and selected my system level instal of Python 3.10 But that shouldn’t have been accessing the virtual environment (I assume?). But got the same errors after turning that back off, which (again, assuming) should just then be using the clean TD version. Either way, the solution above fixed things here as well. THANKS ALL!
Hi, I am having issues with the stable diffusion plug in. It was working initially but when I updated my TD to the latest version (2023.11340) I am getting this error. I have a Mac book 2019, OS Monterey. I am not sure how to fix this. Thank you.