I develop in Python 3.6 and Flask. I'm currently working with a SQLAnywhere database and have installed the Python package sqlanydb. I have also installed the SQLAnywhere17 driver for Mac OSX.
Up until earlier this week I was developing normally, until I decided to update my Mac from Yosemite to High Sierra. I was unaware of SIP at the time, and so I may have made a premature decision in upgrading.
Since I've upgraded I've been unable to develop as normal because when sourcing the SQLAnywhere17 files, it adds a path to the DYLD_LIBRARY_PATH. However, when I run my flask application in flask's development server with
export FLASK_APP=modules export FLASK_DEBUG=1 flask run
It purges all of the SQLAnywhere 17 dyld files that were added to my environment, and I get a
could not load dbcapi error.
I'm looking for a solution where I don't have to disable SIP because I understand that the purpose of the protection is important. I would just like to be able to disable it for running my flask application.
My Python 3.6 files and site-packages are located in
/usr/local. From this article I learned I can see which files are being protected by SIP with
ls -alO. However, when I run this command on
/usr/local and all the directories within, and it seems that none of the files are being protected. The
/usr/local directory itself has
sunlink where the
protected would be on SIP protected files. I'm not sure what that means.