-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pip install missing dependencies #33297
Comments
Are you talking about https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/plugins/plugins.html#plugin-metadata and search for http://changelog.qgis.org/en/qgis/version/3.8/#plugin-dependencies-optional-support |
Yes, I would like to have a button here to get the option to install the external plugins from pypi here. |
I understand that this What I'm asking for is to extend this functionality to also include other external python packages from pypi.org is this a bad idea or shall I try to make a pull request on it? |
I'm pretty sure such an approach is bound to lead to dependencies issues and broken plugins if it were to be implemented. |
This has been discussed a few times in the past years, IIRC the main problems were:
the recommended solution (proven to be effective in large corporate deployments) is to ship the dependencies with the plugin and make sure the modules are namespaced or renamed in order to avoid conflicts with modules with the same name loaded by other plugins. Another approach that has been discussed and that would probably be the best one is to create a separate virtual env for each plugin, but given the fact the we are calling python from C++ code we are probably bound to a single interpreter instance that shares all memory and modules. But please don't be discouraged and if you find a nice solution it will be more than welcome. |
There's a similar problem over at FreeCAD, which is also a monolithic Python/C++/QT/plugins hybrid application. https://forum.freecadweb.org/viewtopic.php?f=10&t=43095 If the problem is caused by a lack of quality control on what gets into the pypi system, one could either (a) bring a few more of the most needed python modules into the core system, or (b) maintain a list of modules that the plugin installer is allowed to pull in before the plugin must be tagged as "experimental". The module I'm most keen on using in FreeCAD is ezdxf, which is very good, and might be of some use to QGIS too. So maybe we just need a list of the non-problematic external modules on the basis of some criteria (eg pure python, no filesystem access outside of the tmp directory, and no subprocess.call() commands). We could either share this list between the projects that need it, or lobby for it to be a standard tag that we can use in the pypi system. |
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". |
Duplicates #18693 |
Feature description.
Would it be possible to make it possible for the user to install external plugins here? Instead of embed code similar to the proposed code in each plugin that require external plugins it would be nice to let the user to "pip install" them without forcing them to open the osgeo4w shell and trying to get that to work (which it seldom do for me unless I write
c:\osgeo4w\apps\python37\python.exe c:\osgeo4w\apps\python37\Scripts\pip.exe install package_x
)Additional context
I'm proposing a button ("Install from pypi") and an option with functionality similar to this:
The text was updated successfully, but these errors were encountered: