Code Monkey home page Code Monkey logo

Comments (7)

bashtage avatar bashtage commented on August 10, 2024

Which version of formulaic do you have installed? Can you try

pip uninstall formulaic -Y
pip install "formulaic>=5,<6"

If that doesn't work, try pip install interface-meta

from linearmodels.

bashtage avatar bashtage commented on August 10, 2024

Possibly formulaic doesn't have all dependencies declared.

from linearmodels.

bashtage avatar bashtage commented on August 10, 2024

I just installed in a clean environment and there are no dependency issues. Is formulaic provided by FreeBSD or pip?

from linearmodels.

yurivict avatar yurivict commented on August 10, 2024

I have the latest formulaic py39-formulaic-0.5.2 installed, see here.

from linearmodels.

bashtage avatar bashtage commented on August 10, 2024

Where did you get it? This isn't a linear models issue.

I would try one of

  1. Pip install interface-meta
  2. Uninstall and reinstall formulaic and interface meta
  3. Create a fresh venv and install linearnodels, which pull in everything needed.

from linearmodels.

yurivict avatar yurivict commented on August 10, 2024

formulaic is installed by the FreeBSD port. One dependency was indeed missing, now this is corrected.

Now the tests fail like this:

================================================================================================ ERRORS =================================================================================================
_____________________________________________________________________________________ ERROR collecting test session _____________________________________________________________________________________
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:972: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:850: in exec_module
    ???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
    ???
linearmodels/__init__.py:40: in <module>
    from .asset_pricing.model import (
linearmodels/asset_pricing/__init__.py:1: in <module>
    from .model import LinearFactorModel, LinearFactorModelGMM, TradedFactorModel
linearmodels/asset_pricing/model.py:15: in <module>
    from linearmodels.asset_pricing.covariance import (
linearmodels/asset_pricing/covariance.py:9: in <module>
    from linearmodels.iv.covariance import (
linearmodels/iv/__init__.py:1: in <module>
    from .absorbing import AbsorbingLS, Interaction  # flake8: noqa
linearmodels/iv/absorbing.py:36: in <module>
    from linearmodels.iv.common import f_statistic, find_constant
linearmodels/iv/common.py:6: in <module>
    from linearmodels.shared.hypotheses import InvalidTestStatistic, WaldTestStatistic
linearmodels/shared/hypotheses.py:10: in <module>
    from linearmodels.typing import ArrayLike
linearmodels/typing/__init__.py:8: in <module>
    from .data import ArrayLike
linearmodels/typing/data.py:12: in <module>
    ArrayLike = Union[np.ndarray, xr.DataArray, pd.DataFrame, pd.Series]
E   AttributeError: module 'xarray' has no attribute 'DataArray'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=========================================================================================== 1 error in 2.11s ============================================================================================

from linearmodels.

bashtage avatar bashtage commented on August 10, 2024

The requirements to run the test suite are different from the requirements needed to use the package.

You can

python -m pip -r requirements-test.txt

to get the contents of the test requirements file installed.

I'm going to close this since I don't there there is any issue that needs fixing. If you still have trouble, please continue to post.

from linearmodels.

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.