Skip to content
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

cannot import name 'NaN' from 'numpy' #6555

Closed
johanatan opened this issue Jul 1, 2024 · 5 comments
Closed

cannot import name 'NaN' from 'numpy' #6555

johanatan opened this issue Jul 1, 2024 · 5 comments

Comments

@johanatan
Copy link

Following the tutorials to install the platform and then the cli, using condo et al, successfully on an M3 macbook air and then getting the following traceback upon trying to run 'openbb' from the condo openbb environment:

  File "/usr/local/Caskroom/miniconda/base/envs/openbb/lib/python3.11/site-packages/pandas_ta/momentum/squeeze_pro.py", line 2, in <module>
    from numpy import NaN as npNaN
ImportError: cannot import name 'NaN' from 'numpy' (/usr/local/Caskroom/miniconda/base/envs/openbb/lib/python3.11/site-packages/numpy/__init__.py)
@deeleeramone
Copy link
Contributor

Hi there, you can resolve this error by downgrading the version of Numpy to one in the specs.

pip install numpy==1.26.4

@johanatan
Copy link
Author

johanatan commented Jul 1, 2024

Ok thanks. Just curious why, if this is needed, isn't it already set in the requirements.txt ?

@deeleeramone
Copy link
Contributor

Good question. Numpy gets installed by Pandas and the issue arises from syntax in the pandas_ta library because the version is not pinned there, it just lets the version installed by Pandas live on. In the next release, this will be pinned on our side so that it doesn't continue to be an issue.

@johanatan
Copy link
Author

Ok, good to know. Thanks

@deeleeramone
Copy link
Contributor

This is resolved with #6572

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants