Closed pellegoeg closed 4 years ago
A) we can add the package to the official list of packages OR B) you can package it as wheel in your plugin C) try to install it as described https://github.com/qgis/QGIS-Mac-Packager/issues/32#issuecomment-588135140
I am unable to install extra python packages using #32 For some reason pip installed that way gets installed in /usr/local/bin and stops working. I imagine it is conflicting with homebrew. Adding the python.framework bin folder from QGIS to the top of the path (before and after installing pip), does not solve the problem.
Would adding pip as a dependency to the official qgis mac packager not solve the problem? We could then call that qgis version of pip directly.
Otherwise, I remember that the, now unavailable, boundlessgeo qgis packager (which was quite similar to this), came with a bash shortcut which would essentially launch a terminal with all the correct paths to install packages via pip or even homebrew for use by qgis. That could also be a way.
A) we can add the package to the official list of packages OR B) you can package it as wheel in your plugin C) try to install it as described #32 (comment)
Hi, @PeterPetrik. I also have the requirement, may I ask some info/tutorial about plan B): package it as wheel in your plugin. thanks.
For some reason pip installed that way gets installed in /usr/local/bin and stops working.
This also happens for me.
There is not pip3 as part of the bundle in location QGIS.app/Contents/MacOS/bin/pip3 . One can simply run pip3 command from this location and install whatever likes which will end up in QGIS.app/Contents/Resources/python/ directory (bundle's site-packages)
available so far only in nightly2 builds
@PeterPetrik I am running into this issue at the moment. There are packages like the IPython plugin and my own custom plugins that require pip to work correctly. Is there a work around or is this only supported in the nightly builds?
it will be available in nightly2 and from PR 3.16 on
Thanks so much for the pip. Just an update on this though. Python packages that include C extension modules (such as triangle) can't be installed through pip in QGIS. They complain about missing header file "Python.h". On Linux, this normally requires an install of "python-dev". On Mac (and Windows?), this is normally included in the python package from most sources. Would it be possible to include this in QGIS? Or even better, is there an alternative way to install such packages or include them in plugins?
Update: At the moment I'm adding a python install that has that header file to C_INCLUDE_PATH in the system envs. That seems to work for me. But this would make distributing plugins that rely on such packages a bit complicated.
Thanks so much for the pip. Just an update on this though. Python packages that include C extension modules (such as triangle) can't be installed through pip in QGIS. They complain about missing header file "Python.h". On Linux, this normally requires an install of "python-dev". On Mac (and Windows?), this is normally included in the python package from most sources. Would it be possible to include this in QGIS? Or even better, is there an alternative way to install such packages or include them in plugins?
Update: At the moment I'm adding a python install that has that header file to C_INCLUDE_PATH in the system envs. That seems to work for me. But this would make distributing plugins that rely on such packages a bit complicated.
Hi, best to create extra ticket to be able to do this to discuss. with C extensions it would be more diffucult, but I can think about it
You are absolutely right of course. Just created the ticket.
Is it not possible to add extra python packages to the QGIS installation?
If I eg. wants to install geopandas in my normal python installation i would $ pip3 install geopandas,
In QGIS3.10 I have tried this: $ /Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python3 -m pip install geopandas
my terminal gives me this:
but afterwards