-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ImportError (import pandas
)
#23798
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
Comments
Your blog shows Can you post the full log from
|
Attaching venv.log (a virtual environment crearted from scratch). All requested versions are inside and much more. The OS is obviously Linux. |
```
Added pandas==0.23.4 from
https://files.pythonhosted.org/packages/67/a7/12261a51ac2e7be4c698ca27cbe364ca5f16d64999456ee47ea8c7b44417/pandas-0.23.4-cp37-cp37m-manylinux1_x86_64.whl#sha256=647b3b916cc8f6aeba240c8171be3ab799c3c1b2ea179a3be0bd2712c4237553
(from -r /home/user/XXX/freeze.txt (line 18)) to build tracker
'/tmp/pip-req-tracker-c_b7vfkl'
```
gets you the correct wheel.
Does anything in there stand out to you?
…On Tue, Nov 20, 2018 at 7:54 PM Alexander Shukaev ***@***.***> wrote:
Attaching venv.log
<https://github.com/pandas-dev/pandas/files/2602280/venv.log> (a virtual
environment crearted from scratch). All requested versions are inside and
much more. The OS is obviously Linux.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23798 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIhYOqgJEo462vNS-SIbd3zbCHuN5ks5uxLJigaJpZM4YqEcr>
.
|
Not really, I mean this is the first package that I'm having such a problem with. I don't know the internals of |
In that log you run `python setup.py test`. Does just "import pandas" work?
Why does `ImportError while importing test module
'/home/user/XXX/test/xxx/test_utils.py'.`? Is that in your venv directory
or outside it?
…On Wed, Nov 21, 2018 at 8:23 AM Alexander Shukaev ***@***.***> wrote:
Not really, I mean this is the first package that I'm having such a
problem with. I don't know the internals of pandas so I cannot speak
about why these multiple exceptions are thrown in the end when I actually
import it. I can only judge from their messages where they claim that they
perhaps cannot locate the C shared libraries carrying the extensions? Where
those are supposed to be after installation?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23798 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIn_cEbb7MnXykIo1tlFhxaaXm-1qks5uxWH3gaJpZM4YqEcr>
.
|
Outside, it's source code. It says that because this module imports |
As soon as I comment out |
Digging through <cython/cython#1720> and e.g. a corresponding fix <IntelPython/mkl_random/pull/1>, given my traceback:
I believe we should add
at the top of <pandas/_libs/tslibs/nattype.pyx> and most likely <pandas/_libs/tslibs/conversion.pyx> and <pandas/_libs/tslibs/conversion.pxd> as well. Could somebody do the changes, please? |
By the way, a workaround from #22788 also works of course, but why not simply fix it? |
at the top of <pandas/_libs/tslibs/nattype.pyx
<https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/tslibs/nattype.pyx>>
and most likely <pandas/_libs/tslibs/conversion.pyx
<https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/tslibs/conversion.pyx>>
and <pandas/_libs/tslibs/conversion.pxd
<https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/tslibs/conversion.pxd>>
as well. Could somebody do the changes, please?
Feel free to make a PR.
…On Fri, Nov 23, 2018 at 3:58 PM Alexander Shukaev ***@***.***> wrote:
Digging through <cython/cython#1720
<cython/cython#1720>> and e.g. a corresponding
fix <IntelPython/mkl_random/pull/1
<IntelPython/mkl_random#1>>, given my traceback:
test/xxx/test_utils.py:41: in <module>
import pandas as pd
.venv/lib/python3.7/site-packages/pandas/__init__.py:28: in <module>
from pandas._libs import (hashtable as _hashtable,
.venv/lib/python3.7/site-packages/pandas/_libs/__init__.py:6: in <module>
from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
pandas/_libs/tslibs/conversion.pxd:11: in init pandas._libs.tslib
???
pandas/_libs/tslibs/conversion.pyx:1: in init pandas._libs.tslibs.conversion
???
pandas/_libs/tslibs/nattype.pyx:14: in init pandas._libs.tslibs.nattype
???
E ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
I believe we should add
from __future__ import absolute_import
at the top of <pandas/_libs/tslibs/nattype.pyx
<https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/tslibs/nattype.pyx>>
and most likely <pandas/_libs/tslibs/conversion.pyx
<https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/tslibs/conversion.pyx>>
and <pandas/_libs/tslibs/conversion.pxd
<https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/tslibs/conversion.pxd>>
as well. Could somebody do the changes, please?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23798 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIgYUhldmZBw5Jz-cpb6Com3cN6Yrks5uyG-FgaJpZM4YqEcr>
.
|
@Alexander-Shukaev @WillAyd and you check if #23940 will fix this? |
I don't think this issue is relevant any longer so closing but if you are still having the issue @Alexander-Shukaev feel free to reopen |
Problem description
First of all, for some reason
pandas==0.23.4
does not even build when installed viapip
(pip install pandas==0.23.4 --force --no-cache
), it simply reports success but importingpandas
fails in the same way as posted below.Not building upon installation looked weird to me (no idea if it's a bug or intentional change) but I decided to give downgrade a go:
This indeed built as it should have but importing still reports errors (same as for unbuilt
0.23.4
):Any ideas how to go about it?
P.S. Please, no
conda
solutions.The text was updated successfully, but these errors were encountered: