Skip to content
This repository has been archived by the owner on May 24, 2019. It is now read-only.

Python 3.6.0 upgrade breaks existing qgis3-dev #11

Open
dakcarto opened this issue Dec 27, 2016 · 5 comments
Open

Python 3.6.0 upgrade breaks existing qgis3-dev #11

dakcarto opened this issue Dec 27, 2016 · 5 comments

Comments

@dakcarto
Copy link
Member

dakcarto commented Dec 27, 2016

Recent Homebrew python3 upgrade from 3.5.x to 3.6.0 causes several issues, fix with:

  • Make sure to brew update prior to doing any of this
  • Associated site-packages for 3.6 is totally new, so lacks previously installed Python packages. Fix: reinstall with pip3 install future psycopg2 numpy matplotlib pyparsing mock nose2 PyYAML, etc. (see brew info qgis3-dev and brew info gdal2-python). You can reference your 3.5 site-packages, possibly using PYTHONPATH=$(brew --prefix)/lib/python3.5/site-packages pip3 freeze
  • Reinstall or upgrade dependencies that were optionally built using --with-python3, e.g. brew upgrade gdal2-python and brew reinstall sip --with-python3. Note: brew upgrade gdal2-python command ignores the numpy requirement, so use pip3 to reinstall that first.

You may see issues with other formulae, since there appears to be an issue with def install always setting PYTHONPATH=<2.7 site-packages> and PYTHONHOME=, though I have not pinned down the problem.

@m-kuhn
Copy link
Member

m-kuhn commented Jan 6, 2017

You may see issues with other formulae, since there appears to be an issue with def install always setting PYTHONPATH=<2.7 site-packages> and PYTHONHOME=, though I have not pinned down the problem.

Hi @dakcarto , do you have any workaround for this?

@dakcarto
Copy link
Member Author

dakcarto commented Jan 6, 2017

@m-kuhn wrote:

Hi @dakcarto , do you have any workaround for this?

Only what I have done for qgis3-dev.

@m-kuhn
Copy link
Member

m-kuhn commented Jan 8, 2017

Only what I have done for qgis3-dev.

Seems that works. While it still spits a warning about future from 2.7 being loaded before the python path mangling in install, the build finally completes 👍 .

@dalekunce
Copy link

I've tried the suggestions above. brew info looks like all deps are installed but I'm getting the following error.

screen shot 2017-02-25 at 10 10 56 am

screen shot 2017-02-25 at 10 11 19 am

@dakcarto
Copy link
Member Author

Ok, figured it out. When gdal2-python.rb is loaded, :python => :recommended is the default, which sets PYTHONPATH=<homebrew/prefix>/lib/python2.7/site-packages in the environ. This needs cleared prior to calling any of the qgis3-dev python3 functions.

Should be 'fixed' in d3e61f0. I do not think this is specific to gdal2-python formula, but any that defines :python2 or 'python' as a hard dependency or :recommended. I am unsure if this is a Homebrew bug (seems like it to me).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants