-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Requires pandas, but not documented? #2279
Comments
Hi @shirriff thank you for reaching out. We want to limit the required dependencies of
This could actually be a really great to contribute to plotly for someone interested. (@nicolaskruchten do you concur?) |
Hi @emmanuelle If you say that pandas is a dependency that is only used in plotly.express , wouldn't it be smarter to make plotly.express a separate project ? Since plotly.express is part of the plotly project, You need pandas for plotly, right? |
Our reasoning for not making it a hard dependency is that you can still use |
By the way, i've got installed pandas, but i still get this error - http://joxi.ru/EA4DMDzipXPV0A |
I have the same problem. |
@pnirtep and @neo-sirapat if you import pandas before you import plotly.express it works! |
I really don't understand "the problem" that folks are reporting here... If you see the error |
@nicolaskruchten correct, the problem reported is that we are receiving the error after installing pandas. |
@jason-danforth thanks for the explanation. This is a pretty different issue from the initial description at the top here but OK, we can work on figuring out what's happening. Can you confirm that Pandas is fully and correctly installed in the same environment you're trying to access Plotly from when this happens? For example, in the same Python process as the one you're seeing the PX error in, what does this print out? import pandas as pd
print(pd.__version__) Can you also tell me about the way you're accessing Python? Via a virtualenv or conda? Which version of Python? Are you in a Jupyter notebook? Via Classic Notebook, JupyterLab or VSCode's extension? What operating system are you on? Etc :) |
@nicolaskruchten no problem, though I just want to reiterate that I was able to resolve the issue by reverting to an earlier version of NumPy. Pandas 1.1.5 |
Thanks! OK so if reverting |
Not exactly. I had no problems using either Pandas or NumPy, but could not run Plotly Express. After attempting to read through the discussion at that URL (and I'll be honest, I understood about 5% of it) I got that there is a larger problem for Windows users related a recent Windows Update and the latest version of Numpy, and that (I suspect) is what is causing the problem for Plotly users. The Microsoft team is anticipating a fix in late January, so you may have users with this problem for some time... |
@jason-danforth |
Having the same problem even if pandas already installed. |
I just figured out the issue which lies in the underline numpy package which is having some dependencies issues in the Win system. Check this link out. I uninstalled numpy and installed 1.19.0 which solves the problem. However I do agree that pandas should be a hard dependency as plotly uses it. |
The underline error for me was missing libf77blas which ultimately fixed my issue. I've still not update numpy is still at 1.19.0 in my setup. `
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy C-extensions failed. This error can happen for We have compiled some common reasons and troubleshooting tips at:
Please note and check the following:
and make sure that they are the versions you expect. Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory ` |
I was able to get past the "pandas" issue by making sure did the pandas import in my code before the import of plotly.express. |
I was having the same problem with the pandas even though it was installed. I followed one of the above comments and put the "import pandas" line before the "plotly.express" line. However now I keep getting the error "File "/media/gerald/Projects/weather/dash/dash/lib/python3.9/site-packages/pandas/io/common.py", line 3, in Any ideas on what is causing this error and more importantly HOW to fix it? BTW, I am using Ubuntu 20.10 with Python 3.9.1 |
Same issue. I follow steps in dash tutial and it only says to install dash itself. But when I try to use plotly express as it shown in examples I get an error that pandas is required |
Same issue with me, I tried all ways, and they give me "_bz2" error! .. any one have the way to solve this error. I'm using Python3.8. |
You could add
setup(
...
extras_require={
'express': ['pandas>=x.y'],
}
) |
I got the solution. "import plotly.express as px requires pandas was the error" |
I also hit this error. |
Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Alternatively, if it's a request for tech support, please post in our community forum. Thank you - @gvwilson |
@emilykl That looks great, thanks! |
I'm new to plotly. I installed plotly with
pip install plotly==4.5.4
and when I tried to generate a graph, I got 'ImportError: Plotly express requires pandas to be installed.'The getting-started page says "This package contains everything you need to write figures to standalone HTML files." I looked through the documentation, but couldn't find anywhere that said pandas was required, or how to install pandas.
To reproduce:
Maybe this is intentional (see #2125), but I think the documentation should be clearer. Automatically installing pandas would be even better.
The text was updated successfully, but these errors were encountered: