Thank you in advance. I have pandas-datareader==0.7.0+7.g7949e60 succesfull installed, but when i run the scripts, appears this:
Traceback (most recent call last):
File "/home/pepew/sss/screener/cargadordatos.py", line 14, in <module>
from pandas_datareader import data as pdr
File "/home/pepew/.virtualenvs/myproject/lib/python3.5/site-packages/pandas_datareader/__init__.py", line 2, in <module>
from .data import (DataReader, Options, get_components_yahoo,
File "/home/pepew/.virtualenvs/myproject/lib/python3.5/site-packages/pandas_datareader/data.py", line 7, in <module>
from pandas_datareader.av.forex import AVForexReader
File "/home/pepew/.virtualenvs/myproject/lib/python3.5/site-packages/pandas_datareader/av/__init__.py", line 3, in <module>
from pandas_datareader.base import _BaseReader
File "/home/pepew/.virtualenvs/myproject/lib/python3.5/site-packages/pandas_datareader/base.py", line 13, in <module>
from pandas_datareader._utils import (RemoteDataError, SymbolWarning,
File "/home/pepew/.virtualenvs/myproject/lib/python3.5/site-packages/pandas_datareader/_utils.py", line 5, in <module>
from pandas_datareader.compat import is_number
File "/home/pepew/.virtualenvs/myproject/lib/python3.5/site-packages/pandas_datareader/compat/__init__.py", line 24, in <module>
from pandas.testing import assert_frame_equal
ImportError: No module named 'pandas.testing'
>>>
Pandas-datareader appears to require pandas version 0.19.2+. But the pandas.testing module was only added in 0.20.1
A workaround would be to upgrade the pandas package: pip install pandas -U
Pandas Datareader requires pandas version 0.19.2 or higher. This error is likely due to the fact that your pandas version is before 0.19.2. If this is the case, the best way to update pandas is:
pip install pandas -U
Related
I'm trying to run python code that uses the pandas library on the BeagleBone Black. I have all the necessary libraries and packages downloaded onto the device. When I try to run the code, I get an error regarding the numpy.ndarray size being changed. Currently, I am using Python 3.7.3, numpy 1.20.1, and pandas 1.3.5.
When I try to my python file, an error occurs with importing the pandas library. The traceback of the error I'm encountering is included below. I have tried the following to resolve this issue:
pip install --upgrade numpy
and
pip uninstall numpy
pip install numpy
as suggested here.
Traceback
root#beaglebone:/mnt/microSD# python chunkANDconvert.py
Traceback (most recent call last):
File "chunkANDconvert.py", line 2, in <module>
import pandas as pd
File "/usr/local/lib/python3.7/dist-packages/pandas/__init__.py", line 22, in <module>
from pandas.compat import (
File "/usr/local/lib/python3.7/dist-packages/pandas/compat/__init__.py", line 15, in <module>
from pandas.compat.numpy import (
File "/usr/local/lib/python3.7/dist-packages/pandas/compat/numpy/__init__.py", line 7, in <module>
from pandas.util.version import Version
File "/usr/local/lib/python3.7/dist-packages/pandas/util/__init__.py", line 1, in <module>
from pandas.util._decorators import ( # noqa
File "/usr/local/lib/python3.7/dist-packages/pandas/util/_decorators.py", line 14, in <module>
from pandas._libs.properties import cache_readonly # noqa
File "/usr/local/lib/python3.7/dist-packages/pandas/_libs/__init__.py", line 13, in <module>
from pandas._libs.interval import Interval
File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 44 from C header, got 40 from PyObject
I have a python code for a discord bot. It is working locally but when I try to run it on replit.com I get this error.
Traceback (most recent call last):
File "main.py", line 2, in <module>
import pandas as pd
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/__init__.py", line 48, in <module>
from pandas.core.api import (
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/api.py", line 48, in <module>
from pandas.core.groupby import (
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/groupby/__init__.py", line 1, in <module>
from pandas.core.groupby.generic import (
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/groupby/generic.py", line 70, in <module>
from pandas.core.frame import DataFrame
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/frame.py", line 157, in <module>
from pandas.core.generic import NDFrame
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/generic.py", line 152, in <module>
from pandas.core.window import (
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/window/__init__.py", line 1, in <module>
from pandas.core.window.ewm import ( # noqa:F401
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/window/ewm.py", line 12, in <module>
import pandas._libs.window.aggregations as window_aggregations
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory
I already installed the packages but didn't work, but it pandas does work on the bash window when I run python3 there.
I couldn't find any solution other than forking another repl and putting my files there.
here is the repl if anyone is interested: https://replit.com/#HourKesh/AppropriateKnobbyInstruction#poetry.lock .
Try going to the replit shell and type pip3 install pandas.
I am getting this error,
/tmp/Python-3.7.5$ python3 main.py
Traceback (most recent call last):
File "main.py", line 3, in <module>
import pandas as pd
File "/home/abc/.local/lib/python3.7/site-packages/pandas/__init__.py", line 51, in <module>
from pandas.core.api import (
File "/home/abc/.local/lib/python3.7/site-packages/pandas/core/api.py", line 31, in <module>
from pandas.core.groupby import Grouper, NamedAgg
File "/home/abc/.local/lib/python3.7/site-packages/pandas/core/groupby/__init__.py", line 1, in <module>
from pandas.core.groupby.generic import DataFrameGroupBy, NamedAgg, SeriesGroupBy
File "/home/abc/.local/lib/python3.7/site-packages/pandas/core/groupby/generic.py", line 65, in <module>
from pandas.core.frame import DataFrame
File "/home/abc/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 119, in <module>
from pandas.core import algorithms, common as com, generic, nanops, ops
File "/home/abc/.local/lib/python3.7/site-packages/pandas/core/generic.py", line 112, in <module>
from pandas.io.formats import format as fmt
File "/home/abc/.local/lib/python3.7/site-packages/pandas/io/formats/format.py", line 77, in <module>
from pandas.io.common import stringify_path
File "/home/abc/.local/lib/python3.7/site-packages/pandas/io/common.py", line 3, in <module>
import bz2
File "/usr/local/lib/python3.7/bz2.py", line 19, in <module>
from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
what is the solution?
How did you install your Python? If you've manually built it or used the make command, you might be missing the bz2 library headers.
Try the following...
Centos/Fedora/RHEL:
sudo yum install bzip2-devel
Debian and Ubuntu:
sudo apt-get install libbz2-dev
You'll then either need to rebuild your Python installation or to copy the header in your Python folder, with:
sudo cp /usr/lib/python3.7/lib-dynload/_bz2.cpython-38-x86_64-linux-gnu.so /usr/local/lib/python3.7/
I am running Python 3.5.1 on Windows 10 and have Anaconda and IDLE installed.
If I run any Python files, pandas and numpy seem to work in Jupyter notebooks, but not in IDLE.
I have ensured that the PATH and PYTHONPATH environment variables include access to the folders where pandas and numpy are located (Lib/site-packages).
I receive the following error in IDLE when trying to import pandas:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import pandas
File "C:\Users\me\AppData\Local\Continuum\Anaconda3\Lib\site-packages\pandas\__init__.py", line 18, in <module>
raise ImportError("Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']
When I try to import numpy I get the following error:
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import numpy
File "C:\Users\me\AppData\Local\Continuum\Anaconda3\Lib\site-packages\numpy\__init__.py", line 180, in <module>
from . import add_newdocs
File "C:\Users\me\AppData\Local\Continuum\Anaconda3\Lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Users\me\AppData\Local\Continuum\Anaconda3\Lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Users\me\AppData\Local\Continuum\Anaconda3\Lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Users\me\AppData\Local\Continuum\Anaconda3\Lib\site-packages\numpy\core\__init__.py", line 14, in <module>
from . import multiarray
ImportError: cannot import name 'multiarray'
Can someone help?
try this:
I had the same problem
https://stackoverflow.com/a/40637960/6376603
maybe the above answer will help.
I had similar problem. I uninstalled anaconda from my system completely.
Steps - Delete app, delete anaconda3 folder, empty trash
Then I reinstalled older version of it and it started working perfectly. Maybe it is some kind of bug in the newer version.
I am using pydev plugin in Eclipse Juno for my python programming in windows 7 and i am using python 3.2, it works fine while running python application which using standard python packages. For my one of my project i have to use pandas library, for that i download and install numpy and pandas Windows installer for python 3. But while running even a small program it shows error message. So anyone have any idea about how to install and test pandas in Windows 7 by using eclipse, just pass it to me.
The error message is like this:
Traceback (most recent call last):
import numpy
File "C:\Python32\lib\site-packages\numpy\__init__.py", line 137, in <module>
from . import add_newdocs
File "C:\Python32\lib\site-packages\numpy\add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "C:\Python32\lib\site-packages\numpy\lib\__init__.py", line 4, in <module>
from .type_check import *
File "C:\Python32\lib\site-packages\numpy\lib\type_check.py", line 8, in <module>
import numpy.core.numeric as _nx
File "C:\Python32\lib\site-packages\numpy\core\__init__.py", line 40, in <module>
from numpy.testing import Tester
File "C:\Python32\lib\site-packages\numpy\testing\__init__.py", line 8, in <module>
from unittest import TestCase
File "C:\Python32\lib\unittest\__init__.py", line 59, in <module>
from .case import (TestCase, FunctionTestCase, SkipTest, skip, skipIf,
File "C:\Python32\lib\unittest\case.py", line 6, in <module>
import pprint
EOFError: EOF read where not expected
Thanks in advance for your time
I think you have Install panda: here you can find panda package for windows here
https://pypi.python.org/pypi/pandas#downloads