Bug report #19319

Qgis 3.2 and Python 3.7

Added by Arthur Vignacq over 6 years ago. Updated over 5 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Build/Install
Affected QGIS version:3.2 Regression?:No
Operating System:osx 10.10.5 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27147

Description

Hello,

I've tried today to install QGIS 3.2 on mac osx with Python 3.7 new install.
No old version of Python nor Qgis installed on this computer.
Installation of GDAL worked but QGIS refused to install because "need Python 3" to be installed first.

I verified this twice with same error.

Then I also installed Python 3.6.6. and the it worked.

I don't know if this is related with #18430-7, but it also affects the Python relation with QGIS on mac

History

#1 Updated by Jon Sagara over 6 years ago

I witnessed the same behavior on macOS 10.13.5.

#2 Updated by Jürgen Fischer over 6 years ago

  • Description updated (diff)

#3 Updated by Paul Zimmerman over 6 years ago

I just verified that this happens because the installer looks for the /Library/Frameworks/Python.framework/Versions/3.6 directory. When I symlinked the existing 3.7 directory to 3.6, installation proceeded without incident. I think that the installer should be updated to check for a version of python3 by invoking it, rather than simply checking for the existence of an installation in a particular directory.

#4 Updated by Jeff Meyer over 6 years ago

Hi - double/triple-confirming this concern.

Another side issue: I don't think homebrew or others are even using the /Library/Frameworks/Python.framework path anymore. I just installed python3 on a fresh machine/OS install and it appears to be at /usr/local/opt/python/Frameworks/Python.framework/.

So, +1 for not checking a path & instead invoking it.

#5 Updated by Sergio Rodrigues almost 6 years ago

This solution didn't work for me. I'm on a Mac OS using anaconda and did ln -s /Users/sergio/anaconda3/bin /Library/Frameworks/Python.framework/Versions/3.6/bin but QGIS won't find Python 3.6.

#6 Updated by Andrew Saturn over 5 years ago

After you've installed Python with HomeBrew, try this:

sudo ln -s /usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/ /Library/Frameworks/Python.framework

HomeBrew installs Python to the /usr/local/Cellar directory, but QGIS wants to look in /Library/Frameworks/

Note to use the correct version, where the 3.7.2_2 is whatever version you have installed... it may be different by the time you read this.

#7 Updated by Andrew Saturn over 5 years ago

Andrew Saturn wrote:

After you've installed Python with HomeBrew, try this:

sudo ln -s /usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/ /Library/Frameworks/Python.framework

HomeBrew installs Python to the /usr/local/Cellar directory, but QGIS wants to look in /Library/Frameworks/

Note to use the correct version, where the 3.7.2_2 is whatever version you have installed... it may be different by the time you read this.

Also if you still run into issues, it may require 3.6, in which case... sudo ln -s /Library/Frameworks/Python.framework/Versions/3.7/ /Library/Frameworks/Python.framework/Versions/3.6

Also available in: Atom PDF