Python pandas module openpxyl version issue - python

My installed version of the python(2.7) module pandas (0.14.0) will not import. The message I receive is this:
UserWarning: Installed openpyxl is not supported at this time. Use >=1.6.1 and <2.0.0.
Here's the problem - I already have openpyxl version 1.8.6 installed so I can't figure out what the problem might be! Does anybody know where the issue may lie? Do I need a different combination of versions?

The best thing would be to remove the version of openpyxl you installed and let Pandas take care.

Related

'numpy.core._multiarray_umath' in Eclipse IDE

I am running Eclipse IDE 4.20.0 with a PyDev Interpreter on Windows10. I am trying try to get [Camelot][1] to run within my script but continue to get the error-
"Original error was: No module named 'numpy.core._multiarray_umath'"
For each, I have used pip install to install camelot, tabula-py, numpy, pandas, etc. and all of them seemed to install appropriately. My Eclipse Project Properties PYTHONPATH is pointed to the install location and I haven't had issues with other libraries I have installed previously.
The Python version is: Python3.7
The NumPy version is: "1.21.5"
I also tried reverting numpy to an older version (1.15.1) but had no success there based on other posts that I have seen here on stackoverflow. Additionally, I have read the numpy support site that is listed in the error below but can't find anything that would be of note in my system as an issue...
Ultimately, I am attempting to read tables from a PDF in python but it seems that the libraries available (camelot, tabula, etc.) all give me the same issue with numpy. Any suggestions here would be greatly appreciated.
The full error that I am getting is -
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed.
This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
The Python version is: Python3.7 from "C:\Users~~~\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe"
The NumPy version is: "1.21.5"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named 'numpy.core._multiarray_umath'

Numpy installed, but module not found

I've tried several fixes for this suggested in other threads, but no luck.
I'm new to Python. I had 3.8.5 installed and wrote a few simple scripts that worked using PyCharm and the numpy and sympy modules. Today I opened PyCharm and tried to write a simple script using numpy, but I got an error saying the numpy module did not exist. I also got this error when trying to run the older scripts. I checked in cmd with pip3, and got the result that it was already satisfied. I uninstalled Python, numpy, and PyCharm, reinstalled all and I'm having the same problem. This problem seemed to crop up on its own - I don't recall making any changes that would've caused this.
Can anyone give me other options?
One of the most common issues with Python is having multiple versions installed and losing track of which one you are using and/or which one you're installing to with pip.
In Pycharm check what interpreter your project is using. If there is more than one available chance are you installed numpy on the other one.
https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#add-existing-interpreter
You can also install numpy direct from Pycharm, simply hover over the import statement and if it's not installed on the current interpreter it will offer you a link to click in install it.
If that doesn't help, post the exact error message and your code.

ImportError: No module named 'pandas.core.internals.managers'; 'pandas.core.internals' is not a package

When I tried to read a pickle file that saved by a former version of pandas, it yielded an ImportError.
ImportError: No module named 'pandas.core.internals.managers';
'pandas.core.internals' is not a package
There was no hit on stackoverflow so i would like to share my solution for this particular problem.
This error comes off due to encoding of formerly saved pickle file. If you updated pandas to newly amended version, it produces this import error.
I was facing the same error when I was using pandas version 0.23.4.
I have installed pandas 0.24.1 version explicitly by:
pip3 install pandas==0.24.1
This solved my problem(Python version I was using was 3.5)
I had the same problem, but for me, it seemed to come from the pickle package / interaction with the pandas package.
I had Pandas version 0.23.4.
I saved some pickle files with pandas.Dataframe.to_pickle, with python 3.6.6 & Pandas version 0.23.4.
Then I upgraded to python 3.7.2 (Pandas version 0.23.4), and was enabled to read thoses pickle files with pandas.Dataframe.read_pickle.
Next, I upgraded pandas to pandas 0.24.1, and it worked for me. I can read those files again.
Updating pandas would be the best solution for most cases. However if you have limitations updating your pandas version, and you need to consume pandas objects produced and pickled in a higher version, you can add class location map as below.
from pandas.compat.pickle_compat import _class_locations_map
_class_locations_map.update({
('pandas.core.internals.managers', 'BlockManager'): ('pandas.core.internals', 'BlockManager')
})
conda update pandas
If you use conda package manager.

Installed Pandas but Python still can't find module

I've tried installing Pandas in many different ways. Currently, it is installed using Anaconda and I have created a virtual environment. Below it shows that Pandas is installed, yet the module still can't be detected. Sorry if this has been answered before. I am still a beginner with Python.
Picture of current Terminal
maybe it doesn't match with the version you use which version you use?You can find it by pressing python in a terminal.Maybe you dont find it in the version you are using!

Cannot seem to install pandas for python 2.7 on windows

Sorry if this has been answered somewhere already, I couldn't find the answer.
I have installed python 2.7.3 onto a windows 7 computer. I then downloaded the pandas-0.10.1.win-amd64-py2.7.exe and tried to install it. I have gotten past the first window, but then it states "Python 2.7 is required, which was not found in the registry".
I then get the option to put the path in to find python, but I cannot get it to work.
How would I fix this? Sorry for the silly question.
Thanks.
~Kututo
I faced the same issue. Here is what worked
Changed to PATH to include C:\Python27;C:\Python27\Lib\site-packages\;C:\Python27\Scripts\;
uninstall 64bit numpy and pandas
install 32win 2.7 numpy and pandas
I had to also install dateutil and pytz
pandas and numpy work import work fine
After you have installed python check to see if the appropriate path variables are set by typing the following at the command line:
echo %PATH%
if you do not see something like:
C:\Python27;C:\Python27\Scripts
on the output (probably with lots of other paths) then type this:
set PATH=%PATH%;C:\\Python27\\;C:\\Python27\Scripts
Then try installing the 32-bit pandas executable.
You should try the anaconda distribution for windows. Is free, comes with all the package you will ever need, and one click installation.
http://continuum.io/downloads.html

Categories

Resources