Skip to content

DOC: Improve compiler installation instructions #28316

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

Merged
merged 4 commits into from
Sep 11, 2019

Conversation

lucyleeow
Copy link
Contributor

@lucyleeow lucyleeow commented Sep 6, 2019

Note:

  • For Linux, we have recommended to install a group of packages, along with GCC:
    sudo apt-get install build-essential and yum groupinstall "Development Tools" whereas in the sklearn installation page have recommended to install GCC with sudo apt-get install build-essential but to install individually for Fedora etc: `sudo yum -y install gcc gcc-c++``

Which would be better?

@WillAyd
Copy link
Member

WillAyd commented Sep 6, 2019

Thanks for the PR. I'm indifferent as to whether or not some of this should be included. Good to have but main concern will be keeping relevant (ex: Xcode 4.2 mentioned was released 8 years ago)

Just out of curiosity have you tried using a conda installed compiler? Wondering if that wouldn't make configuration and installation easier for newcomers:

https://www.anaconda.com/utilizing-the-new-compilers-in-anaconda-distribution-5/

@WillAyd WillAyd added the Docs label Sep 6, 2019
@lucyleeow
Copy link
Contributor Author

Main concern was that the links in the current documentation direct to pages that do not actually talk about how to install a C compiler. This is confusing and I think this is a barrier for new contributors.

Happy to change doc to just link to conda and state that there are alternative ways of installing compilers and they can use if they wish?

@WillAyd
Copy link
Member

WillAyd commented Sep 6, 2019

Maybe - haven't tried personally so don't know of any limitations that would have w.r.t. pandas. Interested in trying it out on your end?

@lucyleeow
Copy link
Contributor Author

I'm not sure if a conda installed compiler is a good option as it is designed for building conda packages. However, installing a compiler from conda forge may be a good option for Mac. I believe @ogrisel and @jeremiedbb are looking into compiler installation for Mac and then updating the sklearn contributing docs. I think I will link/copy theirs once they are done.

Meanwhile I might copy the windows section from sklearn instead of just linking to it.

@jorisvandenbossche jorisvandenbossche changed the title Improve compiler installation instructions DOC: Improve compiler installation instructions Sep 7, 2019
@jorisvandenbossche
Copy link
Member

@WillAyd the link about the conda compilers you give is a link about using those compilers when building packages, but not about installing those in a user (contributor) environment. However, conda-forge wrapped those in a meta-package that can be installed: https://anaconda.org/conda-forge/compilers.

But, we first need to have more testing of this I think to be sure to recommend this. In the meantime, this PR is already a big improvement over the current useless links (except for the mac part which is incorrect, maybe we should just leave that out for now).

@@ -135,9 +135,35 @@ operations. To install pandas from source, you need to compile these C
extensions, which means you need a C compiler. This process depends on which
platform you're using.

* Windows: https://devguide.python.org/setup/#windows-compiling
* Mac: https://devguide.python.org/setup/#macos
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Mac, the https://devguide.python.org/setup/#macos link actually has some explanation about installing XCode, so maybe for this one we can keep the link until we have better instructions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have replaced my Mac instructions with just the link above.

I've also changed formatting - happy to change back as well @jorisvandenbossche

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting looks good!


And build pandas from this environment::

python setup.py install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed here, as we first still need to install all dependencies which is only mentioned below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, that was silly of me.

For 64-bit Python, configure the build environment with::

SET DISTUTILS_USE_SDK=1
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this step is not needed for pandas, as we use setuptools and not distutils as scikit-learn does (based on https://wiki.python.org/moin/WindowsCompilers#Distutils_notes, at least the env variables is not needed for setuptools)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WillAyd WillAyd added this to the 1.0 milestone Sep 11, 2019
@jorisvandenbossche
Copy link
Member

Thanks @lucyleeow !

We can always further try to improve it (eg if we know the conda-forge compilers can help), but merging this as it is a good improvement over the current links.

@jorisvandenbossche jorisvandenbossche merged commit 18db7fb into pandas-dev:master Sep 11, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants