-
-
Notifications
You must be signed in to change notification settings - Fork 26k
DOC Reorganize general installation instructions #15011
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few first comments. I'll take a deeper look tomorrow
TL;DNR: this is only necessary in the section on "building scikit-learn from source" The necessary OpenMP runtimes are automatically installed when installing a binary release of scikit-learn (wheels, conda packages or Linux distribution packages), so no need to mention anything in this case. When building scikit-learn from source, it's necessary to use a compiler configured with the proper OpenMP runtime. gcc/g++ always come with their libgomp runtime on linux so nothing special is required. This is also the case if gcc/g++ are installed with homebrew on macOS. The only tricky case is the clang compiler shipped by default on macOS. On this system it is necessary to manually install llvm-openmp (also known as libomp) either via homebrow or (condat tricky to do) and configure additional environment variable to make clang use it when building scikit-learn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been discussed many times before whether we really want to document how to create a virtual env... We always decided against it. There are many different ways to create a virtual env (I personally use virtualenvwrapper, other will use something else). The problem is that documenting this properly requires a lot of work, not just giving an example of how it may be done.
I'd rather say something like "in practice, you most likely want to use a virtual env" and link to an external resource that we trust.
(Writing this here because github doesn't let me comment on the code since it wasn't changed)
In the Installing the latest release
section, the first part about "scikit-learn requires" could be removed since these dependencies are now installed directly.
Also I would move the note about matplotlib and the warning at the end of the section. The installation instruction should be a the very top of the section
But without virtual env the user needs to improvise: I have installed scikit-learn from scratch , not beeing a scikit-learn developer (ie without previous isolated environment) using the spacy documentation https://spacy.io/usage ... So I tried to reproduce it.
Fixed in fcb1341 |
what do you mean improvise? |
Sorry, my English is far from perfect... :( |
Indeed it's true that on Linux, it's highly recommended never to install anything with pip on the system Python and for beginner Python/scikit-learn users under Linux it can be confusing to get started, as just typing "pip install scikit-learn" will first lead to "pip command not found error" then if the user chooses to use the system "pip3". However if the system version of pip3 is recent enough (>=9.1? which is the version on Ubuntu 18.04) pip will automatically install the home folder On Windows and macOS (~88% or people browsing the documentation), creating a venv probably not as necessary as on Linux because there is no conflicting package manager for Python packages: Windows has no package so it's natural to use pip once Python is installed. Both the python.org installer and the anaconda installer will install Python in a folder that does not require administrative permissions by default. On macOS, homebrew only installs python and pip and then the user uses pip to install python packages). I think vast majority of scikit-learn developers would rather use either a conda environment or a virtualenv (created |
+1 for setting something similar to https://spacy.io/usage . |
I'd be happy with an interactive selector like in spacy, as long as we advertize conda, venv and virtualenvwrapper (+ any other standard that I don't know about?), and link to something that explain why venvs are needed |
Ok, I'm in. May I just ask to merge this one before? The reorganization of this page was meant to solve also the sphinx warning about |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a few comments but mostly LGTM
@ogrisel , @NicolasHug command lines about python3 venv have been removed, this reduces changes with respect to the on-line version, waiting for a complete "restyling" of the paragraph. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks @cmarmo !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A final suggestion and then LGTM!
Merged! Thanks again @cmarmo! |
Reference Issues/PRs
See also this discussion.
What does this implement/fix? Explain your changes.
This PR
installation.rst
andother_distributions.rst
virtualenv
references in pip standard installationAny other comments?
virtualenv
is unavoidable in practice because depending on the systempip --user
orpip3 --user
give different interactions with installed dependencies (tried on Fedora and Debian).