Qgis - Python download errors using qaequilibrae

230 views
Skip to first unread message

Martijn Heufke

unread,
May 8, 2023, 4:32:12 AM5/8/23
to AequilibraE
Hi everyone,

I read here that there is a new Qgis version of the plugin. Great! However, I can't get it to work. Using Qgis 3.30.2. Mac OS (latest version) and Python through Anaconda. 

When starting Qgis it indicates it is 'missing Python packages and if I want to install them' . So I agree. However, it fails. It gives this message: 

2023-05-08T10:11:58     CRITICAL    python -m pip install -r /Users/MYNAME/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qaequilibrae/requirements.txt -t /Users/MYNAME/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qaequilibrae/packages --upgrade

2023-05-08T10:11:58     CRITICAL    /bin/sh: python: command not found


When I copy that first command in a separate Terminal: ERROR: Invalid requirement: 'Support/QGIS/QGIS3/profiles/default/python/plugins/qaequilibrae/requirements.txt'

Hint: It looks like a path. File 'Support/QGIS/QGIS3/profiles/default/python/plugins/qaequilibrae/requirements.txt' does not exist.


However, when I go to the folder. There does indeed seem to be requirements.txt, which lists some packages it needs in Python to install: aequilibrae==0.9.0.dev1, openmatrix, ortools. I already had openmatrix, ortools installed fine. Using pip install ortools in Terminal, however pip install aequilibrae==0.9.0.dev1 results in: ERROR: Could not find a version that satisfies the requirement aequilibrae==0.9.0.dev1 (from versions: 0.5.0, 0.5.2, 0.5.3, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.7, 0.8.1, 0.8.2, 0.8.3, 0.9.0.dev0, 0.9.0)

ERROR: No matching distribution found for aequilibrae==0.9.0.dev1


And installing pip install aequilibrae results in trying to install 0.9.0. However, that also stops. 

Building wheels for collected packages: aequilibrae

  Building wheel for aequilibrae (pyproject.toml) ... error

  error: subprocess-exited-with-error

  

  × Building wheel for aequilibrae (pyproject.toml) did not run successfully.

  exit code: 1

  ╰─> [306 lines of output]

      /private/var/folders/m7/wjx2gtys7c16bg86r1cdkkj80000gn/T/pip-build-env-y5hwfebj/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`

      !!


The last lines are: 

clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/MYNAME/anaconda3/include -fPIC -O2 -isystem /Users/MYNAME/anaconda3/include -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -I/private/var/folders/m7/wjx2gtys7c16bg86r1cdkkj80000gn/T/pip-build-env-y5hwfebj/overlay/lib/python3.10/site-packages/numpy/core/include -I/private/var/folders/m7/wjx2gtys7c16bg86r1cdkkj80000gn/T/pip-build-env-y5hwfebj/overlay/lib/python3.10/site-packages/pyarrow/include -I/Users/MYNAME/anaconda3/include/python3.10 -c aequilibrae/paths/AoN.cpp -o build/temp.macosx-10.9-x86_64-cpython-310/aequilibrae/paths/AoN.o -std=c++17 -fopenmp -Wno-unreachable-code

      clang: error: unsupported option '-fopenmp'

      error: command '/usr/bin/clang' failed with exit code 1

      [end of output]

  

  note: This error originates from a subprocess, and is likely not a problem with pip.

  ERROR: Failed building wheel for aequilibrae

Failed to build aequilibrae

ERROR: Could not build wheels for aequilibrae, which is required to install pyproject.toml-based projects


So I am kind of clueless how to further troubleshoot this issue and not sure if it is specific to my Mac or install or the new plugin. Someone has any idea? 



Pedro Camargo

unread,
May 8, 2023, 6:13:37 AM5/8/23
to AequilibraE
Hi Martin,
                I am a little bit at loss here, as there is a MacOs version of 0.9.0.dev1 on Pypi (https://pypi.org/project/aequilibrae/0.9.0.dev1/#files). Are you using a apple silicon chip? 

You seem to be compiling aequilibrae locallym, which tells me that your interpreter thinks that the compiled artifacts from pypi ar enot adequate for some reason. Being that the case, you may need to set a few extra environemnt variables before installing to make sure to use the right compiler.  The setup can be seen here:  https://github.com/AequilibraE/aequilibrae/blob/develop/.github/workflows/build_mac.yml  but, in a nutshell, there are two required environment variables:

CC= "gcc-12"
CXX= "g++-12"

I have no expertise with MacOS (I'll leave that for Jamie Cook), but he also does not have access to an Apple silicon pc, so we might fall a bit short there.

Cheers,
Pedro



---- On Mon, 08 May 2023 18:32:12 +1000 Martijn Heufke <martijn...@gmail.com> wrote ---

--
You received this message because you are subscribed to the Google Groups "AequilibraE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aequilibrae...@googlegroups.com.


Martijn Heufke

unread,
May 8, 2023, 6:43:28 AM5/8/23
to AequilibraE
Hi, 

Thanks for your help. Indeed, using a new Mini with Apple Silicon M2 chip. Qgis does run as 'Intel' process, not native on Apple Silicon. So I understand there might be a mismatch there? How do I proceed with the linked .yml file? It doesn't seem to be Python code to run Jupiter. Unfamiliar waters for me. Maybe Jamie can point me in the right direction?

Best, 

Martijn
Op maandag 8 mei 2023 om 12:13:37 UTC+2 schreef Pedro Camargo:

Pedro Camargo

unread,
May 8, 2023, 7:04:00 AM5/8/23
to Aequilibrae
Hi Martin,
                   The link yaml file was just to indicate the "recipe" we use to compile the package for MacOS, which has those two environment variables I mentioned (CC and CXX).

I am, however, not sure if it will work on Apple silicon, as I have never tried and I am not sure when one of the AequilibraE developers will have access to an Apple silicon machine.  Anybody interested in having a crack at creating compiled artifacts that we can upload to PyPi?

Cheers,
Pedro





---- On Mon, 08 May 2023 20:43:27 +1000 Martijn Heufke <martijn...@gmail.com> wrote ---

Jamie Cook

unread,
May 10, 2023, 4:18:27 AM5/10/23
to Pedro Camargo, Aequilibrae
Martin, Pedro,

Martin's original error is actually saying that it can't find the
python executable ... on mac the default system python is python3.
There is also a bug in the downloader when your qgis plugin folder has
a space in it (as it does on Mac).
I have a PR that I'm putting together testing this... should be ready
tomorrow (ish).

- Jamie
http://jamiecook.wordpress.com
> To view this discussion on the web visit https://groups.google.com/d/msgid/aequilibrae/187fb083e0e.4771d49f61573.3390837802585912161%40margo.co.

Jamie Cook

unread,
May 10, 2023, 7:04:13 AM5/10/23
to Pedro Camargo, Aequilibrae
PR for this is now up here:
https://github.com/AequilibraE/qaequilibrae/pull/213/files

I've tested on windows and Mac (intel), Jake has tested on Linux and
is having some trouble - if anyone wants to test on other platforms
you just replace the content of "download_extra_packages_class.py"
with the version from the PR, delete the packages sub-dir (see below
image) of the plugin and deactivate/reactivate.


- Jamie
http://jamiecook.wordpress.com
image.png
Reply all
Reply to author
Forward
0 new messages