Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#31882 closed Uncategorized (invalid)

JSONField for SQLite on macos - cannot set DYLD_LIBRARY_PATH

Reported by: zach valenta Owned by: nobody
Component: Uncategorized Version: 3.1
Severity: Normal Keywords:
Cc: Sage Abdullah Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Mariusz Felisiak)

Trying to use JSONField with SQLite on macOS [Mojave 10.14].

I followed the instructions for how to enable SQLite's JSON1 extension but was unable to set DYLD_LIBRARY_PATH as an environmental variable.

# attempt to export
$ export DYLD_FALLBACK_LIBRARY_PATH=path/to/dir
# no stdout
$ env | rg DYLD

Based on Stack Overflow, inability to set this env var is the result of a macOS security policy.

Should the docs for JSONField using SQLite be updated? Is there a commonly used workaround to this problem in the Django community?

Change History (2)

comment:1 by Mariusz Felisiak, 4 years ago

Cc: Sage Abdullah added
Description: modified (diff)
Resolution: invalid
Status: newclosed

Should the docs for JSONField using SQLite be updated? Is there a commonly used workaround to this problem in the Django community?

JSON1Extension is a Wiki page, so you can add a warning or describe a workaround on your own.

Closing per TicketClosingReasons/UseSupportChannels.

comment:2 by Sage Abdullah, 4 years ago

Hi Zach,

Thanks for the report. Unfortunately, I don't have a macOS device, so I cannot test it or confirm any workarounds. Looking at this commit, it looks like it's included on the official macOS installer since 3.7. If that's not an option for you, you may try compiling the extension and enabling it when the connection is created (using Django's connection_created signal). As Mariusz has pointed out, this isn't really the place to discuss this. I'll try editing the wiki page to point to those links. If you want to discuss how we can document this better, we can take it to the mailing list or the forum.

Note: See TracTickets for help on using tickets.
Back to Top