napari: Unable to install any packages/plugins in current bundle

🐛 Bug

Unable to install any packages/plugins in current bundle.

To Reproduce

Steps to reproduce the behavior:

  1. Download recent bundle build: https://github.com/napari/napari/actions/runs/988280586
  2. Try to install any plugins or other packages in plugins > Install/Remove plugins…
  3. Get the error: error: unrecognized arguments: --upgrade

Latest version of pip has not actually removed --upgrade so it’s unclear to me what is going on. For reference the code that is failing is here:

https://github.com/napari/napari/blob/3aef5a5e6ab6c4fb4a83202040f1234ee4aca90b/napari/_qt/dialogs/qt_plugin_dialog.py#L82-L93

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 32 (31 by maintainers)

Commits related to this issue

Most upvoted comments

I modified the bundled files adding a QMessageBox and ran that on the install method inside .

/Applications/napari.app/Contents/Resources/app/napari/_qt/dialogs/qt_plugin_dialog.py

    def install(self, pkg_list: Sequence[str]):
        cmd = ['-m', 'pip', 'install', '--upgrade']
        if running_as_bundled_app() and sys.platform.startswith('linux'):
            cmd += [
                '--no-warn-script-location',
                '--prefix',
                user_plugin_dir(),
            ]

        from qtpy.QtWidgets import QMessageBox
        QMessageBox.information(None, "test", " ".join([self.process.program()] + cmd + list(pkg_list)))
        self.process.setArguments(cmd + list(pkg_list))
        if self._output_widget:
            self._output_widget.clear()
        self.process.start()

as noted in #3097, pinning briefcase to 0.3.1 in https://github.com/napari/napari/pull/2980 did not actually change anything about this problem, since the newer support package (with static libs) is still being used.

we’ll need to pin the support package as well, and since 3.8-b5 states that it’s the first version in static lib format, rather than binary format, we probably need to pin earlier (see here):

[tool.briefcase.app.napari.macOS]
# 3.8-b4 was the last macOS support package in binary format, rather than static lib
# for python 3.9 use 3.9-b1
support_revision = 'b4'

@goanpeca, do you have time to fix this? see #3097 … where this is still popping up

~How can I download the artifact?~

Nevermind, the browser was not scrolling down