Git Product home page Git Product logo

Comments (4)

ilumsden avatar ilumsden commented on June 11, 2024 1

@pearzt this issue will be fixed by #160

from thicket.

ilumsden avatar ilumsden commented on June 11, 2024

@pearzt the newest version of Thicket (2024.1.0) should resolve this. Since that release, all the re-exports that use seaborn are now protected by a try-except-else block (found here).

As a result, running import thicket will no longer produce any errors related to not having seaborn. However, if you run import thicket.stats without having seaborn installed, you will get the following message (not an error):

Seaborn not found, so skipping imports of plotting in thicket.stats
To enable this plotting, install seaborn or thicket[plotting]

One last thing to be aware of: to prevent these errors, we had to change how users import stats functions. As of this release, if you want to access the stats functions (e.g., mean, std, display_boxplot), you need to import them from thicket.stats. So, for example, if you wanted to import mean, you would do:

from thicket.stats import mean

@pearce8 we should probably make a note of this somewhere in our docs.

from thicket.

pearzt avatar pearzt commented on June 11, 2024

@ilumsden I can still reproduce the issue with Thicket 2024.1.0. It seems to me that there still is an "import path" that imports seaborn unconditionally:

>>> import thicket
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "[...]/lib/python3.11/site-packages/thicket/__init__.py", line 13, in <module>
    from . import (
  File "[...]/lib/python3.11/site-packages/thicket/stats/__init__.py", line 24, in <module>
    from .display_violinplot import display_violinplot_thicket
  File "[...]/lib/python3.11/site-packages/thicket/stats/display_violinplot.py", line 7, in <module>
    import seaborn as sns
ModuleNotFoundError: No module named 'seaborn'

from thicket.

ilumsden avatar ilumsden commented on June 11, 2024

@pearzt thanks for checking. I just noticed that two of the "display" modules are not being protected by the "try-except-else" guard. I'll fix that.

from thicket.

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.