Closed nextstopsun closed 6 years ago
@luisspuerto It's done! You tell me how it turned out.
@fjperini Why can't head point to current master instead of revision? Won't it build?
@nextstopsun because I thought it best to use until the revision that I used. Since master changes every day. Let's use this until the new version is published. But you can try only with master.
@nextstopsun didn't build for me before... but I was using the wrong formula.
@fjperini the window it's a little bit... pesky.
It pop up what you click in a grass script in the toolbox. It didn't pop up previously and definitely doesn't pop up in QGIS2.
But... As far as I understood the problem isn't the qgis3 formula but qgis software itself, is it? so... is this problem just present in 3.2.1 version? perhaps in 3.2 isn't present.
@luisspuerto It seems that you need the GRASS session to be started.
Yes, I think the problem is that of software. It would be necessary to report this to the developers @nyalldawson
@fjperini I can try to install 3.2 and see if the window pop up...
@luisspuerto I will use version 3.2.0, to check if it works well. 😂 telepathy
LOL @fjperini 😂
PS/ I'll probably try to build it later.
@luisspuerto Ok! I'm already doing it.
@luisspuerto this is interesting, given that the build_1
works correctly.
I will try some things!
@fjperini is that 3.2.0?
@luisspuerto No, v3.2.1. It's the first build I made. I'm reviewing some things. We are corralling the solution. Ha!
@luisspuerto I found some things that must be changed. I hope that is what is causing the problem.
I've tried to build 3.0.3 with the last formula and it failed.
What we really need to find out is if the pop up window is due to:
For reference: this doesn't happen on any other builds, including the (semi) official OSX qgis packages.
@nyalldawson thanks for let us know... It's probably something related to qgis3 formula or grass one.
@luisspuerto The problem with v3.0.3
, is that you need a patch.
+#include <QDoubleValidator>
+#include <QIntValidator>
Let's use v3.2.1
.
@luisspuerto I'm using the old version of the formula. I will add little by little all the changes that were made. To see if there is an error in the formula.
@luisspuerto @nextstopsun @nickrobison Good news! 🎉
I have built and everything works very well.
I will continue to add the changes I made until I find what caused the problem.
@luisspuerto @nextstopsun Solved! 🎉
I'll try it... did you solved with head or with 3.2.1 release?
I just pull it to my computer and I'm building right now 🙂
Built and no grass window 🎉
However, this was printed in the shell at the end:
GRASS 7 GrassUtils.py has been updated
Warning: osgeo/osgeo4mac/qgis3 dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.
GRASS 7 GrassUtils.py already updated
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'psycopg2'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'requests'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'future'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'jinja2'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pygments'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'PyQt'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'psycopg2'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'requests'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'future'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'jinja2'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pygments'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'PyQt'
Weird, because I have all those modules.
pip install psycopg2 matplotlib pyparsing requests future jinja2 pygments 12:01:24 13.08.18
Requirement already satisfied: psycopg2 in /usr/local/lib/python2.7/site-packages (2.7.5)
Requirement already satisfied: matplotlib in /usr/local/lib/python2.7/site-packages (2.2.2)
Requirement already satisfied: pyparsing in /usr/local/lib/python2.7/site-packages (2.2.0)
Requirement already satisfied: requests in /usr/local/lib/python2.7/site-packages (2.19.1)
Requirement already satisfied: future in /usr/local/lib/python2.7/site-packages (0.16.0)
Requirement already satisfied: jinja2 in /usr/local/lib/python2.7/site-packages (2.10)
Requirement already satisfied: pygments in /usr/local/lib/python2.7/site-packages (2.2.0)
Requirement already satisfied: backports.functools-lru-cache in /usr/local/lib/python2.7/site-packages (from matplotlib) (1.5)
Requirement already satisfied: subprocess32 in /usr/local/lib/python2.7/site-packages (from matplotlib) (3.5.2)
Requirement already satisfied: pytz in /usr/local/lib/python2.7/site-packages (from matplotlib) (2018.5)
Requirement already satisfied: six>=1.10 in /usr/local/lib/python2.7/site-packages (from matplotlib) (1.11.0)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python2.7/site-packages (from matplotlib) (2.7.3)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python2.7/site-packages (from matplotlib) (1.0.1)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python2.7/site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: numpy>=1.7.1 in /usr/local/lib/python2.7/site-packages (from matplotlib) (1.15.0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python2.7/site-packages (from requests) (2018.4.16)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/site-packages (from requests) (3.0.4)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in /usr/local/lib/python2.7/site-packages (from requests) (1.23)
Requirement already satisfied: idna<2.8,>=2.5 in /usr/local/lib/python2.7/site-packages (from requests) (2.7)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python2.7/site-packages (from jinja2) (1.0)
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/site-packages (from kiwisolver>=1.0.1->matplotlib) (39.2.0)
PS/ now I miss the window hahahaahahahaha 😂
@luisspuerto I'll check that! Possibly because I changed a path.
Great work @fjperini 👍
@fjperini Checked and GRASS window is gone. You're the man! Should we close this one?
@nextstopsun yes, later I check the message of the modules.
@luisspuerto @nextstopsun Can you confirm that everything works correctly? I'm reviewing, it seems just a verification message, possibly look elsewhere for those modules. The modules are installed, so QGIS should work well.
I have solved the message problem of the modules. Later I apply the changes.
Great! @fjperini
Do you think they're affecting the functionality of the app?
Perhaps something is still going on with grass:
Your PYTHONPATH points to a site-packages dir for Python 3.x but you are running Python 2.x!
PYTHONPATH is currently: "/usr/local/opt/gdal2-python/lib/python3.7/site-packages:/usr/local/opt/qgis3/lib/python3.7/site-packages:/usr/local/opt/qgis3/libexec/python/lib/python3.7/site-packages:/usr/local/lib/python3.7/site-packages"
You should `unset PYTHONPATH` to fix this.
Your PYTHONPATH points to a site-packages dir for Python 3.x but you are running Python 2.x!
PYTHONPATH is currently: "/usr/local/opt/gdal2-python/lib/python3.7/site-packages:/usr/local/opt/qgis3/lib/python3.7/site-packages:/usr/local/opt/qgis3/libexec/python/lib/python3.7/site-packages:/usr/local/lib/python3.7/site-packages"
You should `unset PYTHONPATH` to fix this.
error while executing a script
PS/ they doesn't happen in qgis2
for sure I'm using python3 ... but grass seems to not recognize it
@luisspuerto Good information. I'm working on it. It may be necessary to build GRASS with (formula) python3
?
It is currently built with python2
.
@fjperini I'm not sure... seems that grass7 still needs python2 to work. Perhaps another option is introduce in the qgis3 PYTHONPATH the path for python2 libraries.
PS/ When you download the official build for mac you only need to install python3. Right now you need to install python3.6 instead of the newest 3.7 as far as I know.
@fjperini perhaps grass needs to be build on python3 for qgis3 https://grasswiki.osgeo.org/wiki/Compiling_on_MacOSX_using_homebrew I don't really know.
I can find anything really conclusive about if it has to be build with python2 or 3... https://grasswiki.osgeo.org/wiki/Compiling_on_MacOSX
I've read that grass 7 still depends on python2 a lot, but I'm not sure if it has to be build with 2 o 3 version.
Perhaps @kyngchaos can give us some clue?
I think GRASS 7 is OK with Python 3, at least GRASS 7.2. And it probably needs to be for QGIS 3 because QGIS includes its own Python shell to run commands, and QGIS 3 requires Python 3.
For the GRASS GUI popping up (I didn't read everything above, maybe you figured it out already), I use a custom GRASS startup that forces a text gui. In grass7x, main():
default_gui = "text"
And just to make sure python 3 is used (I'm not sure how they run from processing), change the shebang at the top of grass7x and all GRASS python scripts:
#!/usr/bin/env python3
@luisspuerto Then we need to build GRASS with python3
.
Test with this formula and verify that the problem with the script is solved.
@fjperini @luisspuerto I'm having a difficult time following all the comments in the thread, can you please summarize for me what the current state of this ticket is?
Are we still experiencing the Grass window popping up?
Are the python3 modules being loaded correctly?
@nickrobison The GRASS window no longer appears. The modules are installed correctly, a path was incorrect. I have already solved it, I will upload the changes.
The new thing that emerged is that it seems necessary to build GRASS with python3
.
@fjperini Why is it necessary to build GRASS with python3?
@nickrobison Because PYTHONPATH
conflicts
Your PYTHONPATH points to a site-packages dir for Python 3.x but you are running Python 2.x!
PYTHONPATH is currently: "/usr/local/opt/gdal2-python/lib/python3.7/site-packages:/usr/local/opt/qgis3/lib/python3.7/site-packages:/usr/local/opt/qgis3/libexec/python/lib/python3.7/site-packages:/usr/local/lib/python3.7/site-packages"
You should `unset PYTHONPATH` to fix this.
Error while executing a script. it would be the only thing left to solve.
Where is that error generated? In QGIS?
@nickrobison Yes, an error when running a GRASS scripts. @luisspuerto reported this problem.
@nickrobison & @fjperini the error is generated while trying to use one script on the grass toolbox on qgis3.
I tried to build with that grass7 formula, but I don't think it's working. Think that it's probably just using the bottle... It's no working because the error still there.
@luisspuerto Build GRASS from source with python3
I made some changes to solve the problem with the modules. It only remains to solve what happens with the script.
@luisspuerto You tried before with this
I use a custom GRASS startup that forces a text gui. In grass7x, main(): default_gui = "text"
change the shebang at the top of grass7x and all GRASS python scripts:
!/usr/bin/env python3
When starting qgis3 a grass welcome window pops up. Same as in https://github.com/OSGeo/homebrew-osgeo4mac/pull/429