spyder-ide / spyder-docs

Documentation for Spyder, the Scientific Python Development Environment
https://docs.spyder-ide.org
MIT License
33 stars 282 forks source link

Enhancement request: Add OS dependency information to the Installation Guide #251

Closed texadactyl closed 2 years ago

texadactyl commented 3 years ago

The purpose of this enhancement request would be to guide users to perform the required O/S installations prior to attempting to launch spyder. This will avoid wasted time and effort for the user and the unpaid support staff.

For example, Debian/Mint/Ubuntu Linux 20.x & 21.04 (possibly other .deb distros too) require thefollowing installations before first launch:

P.S. Some of the Installation Guide text and the references to "spyder3" are dated. Revisit?

ccordoba12 commented 3 years ago

pyqt5-dev (Development libraries for PyQt5 - developers and callers alike) pyqt5-dev-tools (Development tools for PyQt5)

Why are these packages necessary?

python3-pyqt5 (Python 3 bindings for Qt5)

This is really unbelievable: so you need to manually install python3-pyqt5 after installing Spyder? That really shows that Linux distros are totally broken.

P.S. Some of the Installation Guide text and the references to "spyder3" are dated. Revisit?

What do you mean by this?

ccordoba12 commented 3 years ago

I think you should open a bug in Debian to get our dependencies fixed. I mean, what's the point of installing a package there if it's broken when you try to run it?

texadactyl commented 3 years ago

@ccordoba12 - no ill intentions! (:

The O/S dependencies I listed are optional Debian/Ubuntu/Mint packages. Not all of their users are developers just like not all Windows and MacOS users are developers. Of course, the core Qt5 operational packages are provided at installation time.

They are necessary native Qt dynamic libraries (.so, .dll) for the Python code to bind with.

I just removed those O/S packages and installed miniconda. Spyder will not launch. I then reinstalled them and then Spyder launches successfully.

texadactyl commented 3 years ago

Some corrections:

So, the only user action required is to install Debian/Ubuntu/Mint package pyqt5-dev-tools (Development tools for PyQt5).

texadactyl commented 3 years ago

The following are the pyqt5-dev-tools components installed by apt on Xubuntu:

/usr/bin
/usr/bin/pylupdate5
/usr/bin/pyrcc5
/usr/bin/pyuic5
/usr/lib
/usr/lib/python3
/usr/lib/python3/dist-packages
/usr/lib/python3/dist-packages/PyQt5
/usr/lib/python3/dist-packages/PyQt5/pylupdate.abi3.so
/usr/lib/python3/dist-packages/PyQt5/pylupdate_main.py
/usr/lib/python3/dist-packages/PyQt5/pyrcc.abi3.so
/usr/lib/python3/dist-packages/PyQt5/pyrcc_main.py
/usr/share
/usr/share/doc
/usr/share/doc/pyqt5-dev-tools
/usr/share/doc/pyqt5-dev-tools/copyright
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/pylupdate5.1.gz
/usr/share/man/man1/pyrcc5.1.gz
/usr/share/man/man1/pyuic5.1.gz
/usr/share/doc/pyqt5-dev-tools/NEWS.gz
/usr/share/doc/pyqt5-dev-tools/changelog.Debian.gz

One of the PyQT* packages must be using one of the /usr/lib/python3/dist-packages/PyQt5 or /usr/bin files.

So, I probably should raise an issue with one of these Python packages for not diagnosing a missing native dynamic library if I can figure out which one it is:

PyQt5                         5.12.3
PyQt5-sip                     12.9.0
PyQtWebEngine                 5.12.1
QtAwesome                     1.0.2
qtconsole                     5.1.0
QtPy                          1.9.0
texadactyl commented 3 years ago

There are several "spyder3" references in the installation gudie at https://docs.spyder-ide.org/current/installation.html Also, people should not be encouraged to install Spyder from Linux distribution repositories as they are always out of date and potentially more support work. I would stick with Anaconda/miniconda (preferred) or pip instructions and remove the others.

I realize that you have better things to do on a weekend.

CAM-Gerlach commented 2 years ago

Hello @texadactyl , thanks for the detailed information and sorry for the long delay on this. I'm revising the installation guide now and updating out of date references; I'll have a PR shortly.

We actually already do have several strong warnings against installing Spyder from the Linux distro repositories for the reason you mention, and recommend our installers or Anaconda instead (or pip as a backup for advanced users). I've been strengthening and broadening those further as part of the PR.

As for the dep issue, thanks for your through work there; I'll add a warning-level annotation under the pip section letting users know of the issue and recommending your suggested workaround.

Regarding your comments on spyder3, I'm still not clear on exactly what you are saying—is spyder (or something else) now the canonical package name on all distros? Or which, specifically? And is this for the package name, the CLI entrypoint name, or both? Thanks.

texadactyl commented 2 years ago

@CAM-Gerlach No worries about taking time. As this issue is solely about one web page of documentation, I can see it being much lower priority than the feature enhancements and code bug fixes.

I would guess that most folks do not use the method described in https://docs.spyder-ide.org/current/installation.html section entitled "Linux" "Ubuntu" or "Debian" "Using the official package manager:". sudo apt install spyder3 is, as @ccordoba12 said, WAY out of date.

Suggestion: For all Linux and Unix distros, simply tell them to use either the conda method or the pip method as described earlier. Yes, anaconda/miniconda is preferred.

Also, FWIW: Don't use the word "unstable" as an adjective for Debian! Their users typically install Debian stable (recommended). The unstable version is for distro developers who do not expect everything to work. This is analagous to the Ubuntu alpha and beta versions of an upcoming release.

CAM-Gerlach commented 2 years ago

I would guess that most folks do not use the method described in https://docs.spyder-ide.org/current/installation.html section entitled "Linux" "Ubuntu" or "Debian" "Using the official package manager:"

Yep (though unfortunately some do), as those sections are under the "alternative methods" heading further down, not the recommended standalone and Anaconda sections users are guided toward, and guided by multiple "caution" admonitions that mention these issues.

sudo apt install spyder3 is, as @ccordoba12 said, WAY out of date. Suggestion: For all Linux and Unix distros, simply tell them to use either the conda method or the pip method as described earlier. Yes, anaconda/miniconda is preferred.

For now, we've kept those sections briefly mentioned, as some users do insist on using these methods, but mostly to warn them away from such. I've revised the language to include multiple sterner warnings against it and guide users toward supported alternatives (Anaconda/Miniconda, or pip for advanced users), and avoid any phrases like "official" so as to not be misconstrued as our blessing, as opposed to the distro's. I also updated the links to point to the modern spyder package instead of the old Python 3 spyder one on various distros.

Also, FWIW: Don't use the word "unstable" as an adjective for Debian! Their users typically install Debian stable (recommended). The unstable version is for distro developers who do not expect everything to work. This is analagous to the Ubuntu alpha and beta versions of an upcoming release.

This language was from many years ago, but it in fact intentionally directed users at Sid (Unstable) due to it containing a newer Spyder version than Testing/Stable. In any case, I revised it to refer to stable instead, FWIW.