Great thanks gang. I'll look into Just's Skia stuff.
Posts made by Maarten Idema
-
RE: Running Drawbot as a module in environments that aren't Mac OS X
-
Running Drawbot as a module in environments that aren't Mac OS X
Hey there trying to install Drawbot as a module on a Ubuntu server running Python 3.8.10 and getting the following error. This is a dumb question, but is Drawbot Mac OS X only?
Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-o13_uyde/pyobjc-framework-CoreServices/setup.py", line 26, in <module> Extension( File "/tmp/pip-install-o13_uyde/pyobjc-framework-CoreServices/pyobjc_setup.py", line 462, in Extension os_level = get_os_level() File "/tmp/pip-install-o13_uyde/pyobjc-framework-CoreServices/pyobjc_setup.py", line 231, in get_os_level subprocess.check_output(["/usr/bin/sw_vers", "-productVersion"]) File "/usr/lib/python3.8/subprocess.py", line 415, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.8/subprocess.py", line 493, in run with Popen(*popenargs, **kwargs) as process: File "/usr/lib/python3.8/subprocess.py", line 858, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/sw_vers'
-
RE: Using a virtualenv in Drawbot
It does actually work fine from within DrawBot itself. I have been using this since the end of Jan and haven't had an issue.
-
RE: Using a virtualenv in Drawbot
Thanks for that @justvanrossum. I am using the Python modules todoist, requests, and urllib3 to visualise my todo list in Drawbot.
After reading this I kind of resolved to manually downloading each module and have them sit in the same folder as my Drawbot script. This is so tedious especially for updating modules.
But then I realised that I could still set up my virtualenv, pip install my modules, their dependencies and then in my Drawbot script include the path to the site-packages.
import sys sys.path.insert(0, "/Users/maartenidema/t_venv/lib/python3.6/site-packages")
On a quick initial test, this seems to work. I wonder if there will be module conflicts with Python versions going forward.
-
Using a virtualenv in Drawbot
I often set up a different virtual environment for different Python-based scripting ideas that I run in the terminal. I will do this using virtualenv and pip install the needed modules.
So my question is can I select a Python virtualenv from within the Drawbot app or a script that I'm running in Drawbot?
I have tried adding a shebang at the top of the script pointing to the virtualenv's python. I have also tried something like this:
activate_this_file = "/Users/maartenidema/Desktop/t_venv/bin/activate_this.py" execfile(activate_this_file, dict(__file__=activate_this_file))
I feel like I am really overlooking something quite simple.