I forgot to reply all on one of the messages. Sorry.
Jeremy:
"The library loading is confusing. On Linux I think FreeCAD uses the Linux system's Python version. On Windows I think Python is embedded with FreeCAD, and it sounds like OSX is the same way.
The reason CadQuery does not work by itself is that the workbench manipulates sys.path when it loads so that Python will find the CadQuery library. See the
code here from the workbench. If you adapt that code and set the path to the CadQuery library up in sys.path manually in the console, it should load. I've got to get to bed, but if you have trouble with that let me know and I'll post a code snippet tomorrow.
Alternatively, if there is a version of pip (or pip alternative) that works in OSX, you could install CadQuery that way. I'm not sure how that works outside of Linux and Windows though"
Drew:
"Hi Jeremy,
Thanks for the help! However I am still running into the same problem. I tried copying the code you linked to, and ran it using my system's python console. It came up with the same error as before when attempting to import CadQuery (SystemError: dynamic module not initialized properly). Attached is the code I ran.
I have pip installed, and I first installed CadQuery through pip. However whenever I try to import CadQuery in the python console the dynamic module error is triggered. Only when I couldn't get CadQuery to work in the python console did I try the workbench CadQuery, which does work.
I was looking at where CadQuery attempts to set sys.path (
https://github.com/dcowden/cadquery/blob/master/cadquery/freecad_impl/__init__.py), and that init file does set the path on Mac to
/Applications/FreeCAD.app/Contents/lib which is where all of the shared object files for FreeCAD (FreeCAD.so, etc.) are located. When I manually append that location to sys.path and try to import FreeCAD, the same error occurs. So I am fairly certain this isn't a CadQuery problem, it probably has something to do with how FreeCAD works on Macs.
If you have any ideas let me know, I appreciate the help!
Thanks,
Drew"