Page MenuHome

Python misconfiguration in Mac build
Closed, ResolvedPublicBUG

Description

macOS Mojave 10.14.6
Radeon RX 580 GPU

Version 2.80 (2.80 2019-07-29)

Blender seems to be working fine, but BlenderGIS add-on not working on this system. Author of add-on suggests the python is misconfigured in Blender build.

Seems like the sqlite python module is not available in your Blender installation which is anormal because it's a standard python module. The issue is related to Blender itself not BlenderGIS. I think there is a missconfig when the Blender team compiling this MacOS binary and it must be reported into Blender bugs tracker.

Screengrab attached.

Event Timeline

Brecht Van Lommel (brecht) lowered the priority of this task from 90 to 50.

@Arto Kitula (akitula) assigning to you since I guess you will be doing the Python library upgrade.

Python is now updated to 3.7.4, check if it works now.

Hi. Still the same error I'm afraid. Latest grab attached. I'm a little confused why it appears to be trying to look for a local folder on ‘brecht's’ drive when that would be impossible. Good luck... again. Thanks.

Also wanted to check whether this really was a Blender issue or the BlenderGIS add-on, after all?

Check python console and if the version is 3.7.4, your build is up to date.

Console states 3.7.0. That was from a version of Blender downloaded again today, 22 August. Do I need to try that again or go elsewhere for a 'new' build? Thanks.

Wait for buildbot to be able to build new one, it should have the new one.

Blender 2.8.1 build now has Python 3.7.4 and the BlenderGIS add-on now installs. Thank you.

Philipp Oeser (lichtwerk) changed the task status from Unknown Status to Resolved.Aug 22 2019, 9:34 AM

Glad to hear, closing then...

the same question, but the path is 'azo'.

macOS Mojave 10.14.6
python 3.7.4
blender 2.81a

Brecht Van Lommel (brecht) reopened this task as Confirmed.Jan 28 2020, 4:33 PM

Seems the issue still exists indeed.

Brecht Van Lommel (brecht) changed the subtype of this task from "Report" to "Bug".Jan 28 2020, 4:36 PM

The issue still persists in Blender 2.81a :(

Tried 2.8.2-Beta and 2.8.3-Alpha, same problem

Found a solution:
Locate the installed sqlite3-version.
In my case "/opt/local/lib/libsqlite3.0.dylib"
Open the terminal and create the path:

sudo mkdir -p /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/
sudo chmod -R 777 /Users/azo/
cd /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/

Create a ln to your sqlite3:

ln -s /opt/local/lib/libsqlite3.0.dylib libsqlite3.0.dylib

Hi there!

Got the same error below:

After recursively searched for "brecht", much of the matched string hit resides in file "_sysconfigdata_m_darwin_darwin.py". I'm not familiar on Blender internals but seems like this value was statically typed and appears many times:

10 # system configuration generated and used by the sysconfig module
 9 build_time_vars = {'ABIFLAGS': 'm',
 8  'AC_APPLE_UNIVERSAL_BUILD': 0,
 7  'AIX_GENUINE_CPLUSPLUS': 0,
 6  'ANDROID_API_LEVEL': 0,
 5  'AR': 'ar',
 4  'ARFLAGS': 'rcs',
 3  'BASECFLAGS': '-Wno-unused-result -Wsign-compare -Wunreachable-code',
 2  'BASECPPFLAGS': '',
 1  'BASEMODLIBS': '',
 0  'BINDIR': '/Users/brecht/dev/build_darwin/deps/Release/python/bin',
 1  'BINLIBDEST': '/Users/brecht/dev/build_darwin/deps/Release/python/lib/python3.7',
 2  'BLDLIBRARY': 'libpython3.7m.a',
 3  'BLDSHARED': 'gcc -bundle -undefined dynamic_lookup '
 4               '-L/Users/brecht/dev/build_darwin/deps/Release/sqlite/lib '
 5               '-L/Users/brecht/dev/build_darwin/deps/Release/bzip2/lib '
 6               '-L/Users/brecht/dev/build_darwin/deps/Release/lzma/lib '
 7               '-L/Users/brecht/dev/build_darwin/deps/Release/zlib/lib '
 8               '-isysroot '
 9               '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk '
10               '-mmacosx-version-min=10.9',
11  'BUILDEXE': '.exe',
12  'BUILDPYTHON': 'python.exe',

It also appears that these values are to be used by sysconfig module. I didn't dig enough to find out what sysconfig module is, but I hope the snippet above helps resolving the issue.

Thanks!

Yes, the references to ‘local’ paths in the configuration file(s) paths was picked up at the beginning, six months ago. I'm no programmer, but seems no one else is either as this should have been fixed by now. Personally, moved on to another app and solution as I have no faith in a fix here. Shame for the creator of the add-on as well.

AD (black.asta) added a comment.EditedFeb 10 2020, 12:57 AM

@Jason Clark (j-c-c) Oh I see, yes I agree... I went and looked at the Makefile and have seen reference's to the dev's localpath:

9 BASECFLAGS=  -Wno-unused-result -Wsign-compare -Wunreachable-code
8 BASECPPFLAGS=
7 CONFIGURE_CFLAGS= -I/Users/brecht/dev/build_darwin/deps/Release/sqlite/include -I/Users/brecht/dev/build_darwin/deps/Release/bzip2/include -I/Users/brecht/dev/build_darwin/deps/Release/lzma/include -    I/Users/brecht/dev/build_darwin/deps/Release/zlib/include
6 # CFLAGS_NODIST is used for building the interpreter and stdlib C extensions.
5 # Use it when a compiler flag should _not_ be part of the distutils CFLAGS
4 # once Python is installed (Issue #21121).
3 CONFIGURE_CFLAGS_NODIST= -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration
2 CONFIGURE_CPPFLAGS= -I/Users/brecht/dev/build_darwin/deps/Release/sqlite/include -I/Users/brecht/dev/build_darwin/deps/Release/bzip2/include -I/Users/brecht/dev/build_darwin/deps/Release/lzma/include     -I/Users/brecht/dev/build_darwin/deps/Release/zlib/include
1 CONFIGURE_LDFLAGS=  -L/Users/brecht/dev/build_darwin/deps/Release/sqlite/lib -L/Users/brecht/dev/build_darwin/deps/Release/bzip2/lib -L/Users/brecht/dev/build_darwin/deps/Release/lzma/lib -L/Users/brecht/dev/build_darwin/deps/Release/zlib/lib
0 # Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
1 # command line to append to these values without stomping the pre-set

I guess for the time being we can follow the workaround posted above by @Juergen Furrer (juergen.furrer) -- creating a softlink that point to an actual libsqlite3.0.dylib, which Blender.app Gimp directory should have. In my install, it is located at:/Applications/Gimp-2.10.app/Contents/Resources/lib/libsqlite3.0.dylib, not ideal but at least we have a workaround.

Found a solution:
Locate the installed sqlite3-version.
In my case "/opt/local/lib/libsqlite3.0.dylib"
Open the terminal and create the path:

sudo mkdir -p /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/
sudo chmod -R 777 /Users/azo/
cd /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/

Create a ln to your sqlite3:

ln -s /opt/local/lib/libsqlite3.0.dylib libsqlite3.0.dylib

Hello @Juergen Furrer (juergen.furrer) , thank you for the hack provided though I still can't figure out your path for the created directory provided. Is lib folder the same as the one located in contents folder of Blender application?

Found a solution:
Locate the installed sqlite3-version.
In my case "/opt/local/lib/libsqlite3.0.dylib"
Open the terminal and create the path:

sudo mkdir -p /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/
sudo chmod -R 777 /Users/azo/
cd /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/

Create a ln to your sqlite3:

ln -s /opt/local/lib/libsqlite3.0.dylib libsqlite3.0.dylib

Hello @Juergen Furrer (juergen.furrer) , thank you for the hack provided though I still can't figure out your path for the created directory provided. Is lib folder the same as the one located in contents folder of Blender application?

In my system I found lots of libsqlite3.0.dylib (I used the one from mac-port)

Update your locate-db:

sudo /usr/libexec/locate.updatedb

then search for sqlite:

locate libsqlite3.0.dylib

It will show you all locations where sqlite is used:
Filezilla
XCODE
Mono.framework
MacGPG
/opt/local/lib/libsqlite3.0.dylib
/usr/lib/libsqlite3.0.dylib

Found a solution:
Locate the installed sqlite3-version.
In my case "/opt/local/lib/libsqlite3.0.dylib"
Open the terminal and create the path:

sudo mkdir -p /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/
sudo chmod -R 777 /Users/azo/
cd /Users/azo/Code/blender/blender_build/build-libs/Release/sqlite/lib/

Create a ln to your sqlite3:

ln -s /opt/local/lib/libsqlite3.0.dylib libsqlite3.0.dylib

Hello @Juergen Furrer (juergen.furrer) , thank you for the hack provided though I still can't figure out your path for the created directory provided. Is lib folder the same as the one located in contents folder of Blender application?

In my system I found lots of libsqlite3.0.dylib (I used the one from mac-port)

Update your locate-db:

sudo /usr/libexec/locate.updatedb

then search for sqlite:

locate libsqlite3.0.dylib

It will show you all locations where sqlite is used:
Filezilla
XCODE
Mono.framework
MacGPG
/opt/local/lib/libsqlite3.0.dylib
/usr/lib/libsqlite3.0.dylib

Worked like a charm, thank you!

This will be fixed in 2.83, for 2.82 it's too risky a change at this point in the release cycle.

In my system I found lots of libsqlite3.0.dylib (I used the one from mac-port)

Update your locate-db:

sudo /usr/libexec/locate.updatedb

then search for sqlite:

locate libsqlite3.0.dylib

For people unfamiliar with the terminal, note that that first command may take a number of minutes to process on your mac (it's building a database of files on your computer).

It seems to be working for me in 2.83 (2-4-2020 build)

Could the SQlite symlink be the problem for Mac Users (beyond hard-coded references to local drives)?
This is what I receive whenever I update the brew installs.

==> sqlite
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.

If you need to have sqlite first in your PATH run:
  echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.bash_profile

For compilers to find sqlite you may need to set:
  export LDFLAGS="-L/usr/local/opt/sqlite/lib"
  export CPPFLAGS="-I/usr/local/opt/sqlite/include"

For pkg-config to find sqlite you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"

I downloaded 2.83a and BlenderGIS installed. Thanks dr d (snakeblade) for the 2.83 tip. Catalina 10.15.3

Just to confirm, tried 2.83a and BlenderGIS installed without error. Thank you snakeblade!

Hi

I just have tried to use Blender GIS on my Mac and I'm using Blender 2.83.1, so according the the comment on this site it also should work on a Mac:
https://github.com/domlysz/BlenderGIS
Unfortunately it does not work, I can install it without any problem, but as soon I open a Map from Google Maps with Satelite, Blender is blocked, so I can't do anything in "Files" or "Editing", etc. The only thing I can do is, moving the Map on the Display, scrolling of the Map is also not possible.
So I just can see the small Map of the World, but I can't do anything more, than moving this Map.
Is there a possibility to fix this?
Would be very grateful, if I also could use it on my MAC.

Thanks in advance.

I have the same error as Martin. Running latest 2.83.2 on OS Catalina, installing plugin works fine, enabling plugin works fine, clicking GIS, selecting base map loads a small world map square, then the whole program locks up and the only button that works is the menu bar, allowing quit, but nothing else is clickable.

@Jay (HyperA) @Martin (Martino88), your difficulties have nothing to do with the original issue described here which is now resolved and closed. If you need help, open a new issue at the addon homepage and please don't bother the Blender team here. Also it seems that both of you haven't read the addon documentation as the basemap operator is a modal operator and you just need to press echap to exit it.