Giter Club home page Giter Club logo

Comments (9)

mwaskom avatar mwaskom commented on May 17, 2024

Yeah this came up in #5. Do you have a pointer for how to get that to work?

from seaborn.

sjobeek avatar sjobeek commented on May 17, 2024

I'm not a packaging expert, but some searching lead me to believe that adding some install_requires=... lines to your setup.py might solve the issue.

See this for reference:
http://stackoverflow.com/questions/6947988/when-to-use-pip-requirements-file-versus-install-requires-in-setup-py

from seaborn.

mwaskom avatar mwaskom commented on May 17, 2024

Yeah, my understanding was that install_requirements triggers a failure when you try to pip install without everything listed, but not that it installs the dependencies for you? I have to look into it more closely, though.

from seaborn.

jmcarp avatar jmcarp commented on May 17, 2024

install_requires would normally work, but since the requirements here (e.g. statsmodels) don't specify their own requirements with this flag, requirements are installed in the wrong order. Will see if there's a workaround.

from seaborn.

sjobeek avatar sjobeek commented on May 17, 2024

It looks like there used to be some other commands like setup_requires, but the following page says that install_requires will download and build the packages.

http://peak.telecommunity.com/DevCenter/setuptools#declaring-dependencies

from seaborn.

sjobeek avatar sjobeek commented on May 17, 2024

Oh geeze, I didn't even think about how complex it would be trying to auto-install all of numpy / scipy / statsmodels / matplotlib etc.... that is definitely a serious undertaking.

What I was imagining was something a bit less ambitions: using install_requires only for packages that aren't part of the standard scientific python stack (which is usually installed already via Anaconda etc.)

Specifically, husl and moss are two that should (?) be relatively easy to get working with install_requires, and it I think it would solve this issue for the vast majority of people without requiring you to package the whole stack.

Perhaps scikit-learn could also be added to those two.

from seaborn.

mwaskom avatar mwaskom commented on May 17, 2024

My understanding is that scikit-learn is among the most difficult packages to auto-install. But there's only a single function (in moss) that depends on it, so I was actually probably going to move that function elsewhere to remove the scikit-learn dependency in seaborn.

I think husl is a single file, so it might be reasonable to just package that with seaborn. I don't think the author updates it very often.

from seaborn.

sjobeek avatar sjobeek commented on May 17, 2024

Ahh, well I take back what I said about scikit-learn; I've never tried to install that one myself.

Either auto-installing moss and husl, or removing dependencies and doing what you suggest both seem like workable solutions.

from seaborn.

mwaskom avatar mwaskom commented on May 17, 2024

OK I have to admit that was considerably easier than I thought it would be. To test it, I ran (from the source directory):

conda create -n seaborn_dep_test anaconda
pip install .
make test

Which ran with no errors. I think this is good to go, thanks for hounding me!

from seaborn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.