Illegal instruction (core dumped) Cant import pandas - pandas

enter image description here
code object from '/home/bigdata/.local/lib/python3.10/site-packages/pyarrow/pycache/_generated_version.cpython-310.pyc'
import 'pyarrow._generated_version' # <_frozen_importlib_external.SourceFileLoader object at 0x7eff63589720>
Illegal instruction (core dumped)
i have tried to uninstall and install pandas, tried brew also and check if other libraries are working correct and all are working right except pandas which stop working, i am using ubuntu 20.04, Python3.10, check GitHub and several online forums if i can get help but i tried what they said but nothing works. Please any help is highly welcome and appreciated. Thanks for your help in Advance

Related

Import of Pandas fails in Spyder due to Numpy dependency

trying to run some code in Spyder and encountering this error:
ImportError: Unable to import required dependencies:
numpy:
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.9 from "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9"
* The NumPy version is: "1.21.2"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so, 2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so: mach-o, but wrong architecture
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so: mach-o, but wrong architecture
I have looked at the tips provided in the link above, and perused the web, but can't find a solution.
Note: The Script runs fine in VScode. This only seems to occur in Spyder, which I'm trying to use in particular.

DLL load failed _multiarray_unmath when importing numpy

I installed Numpy v. 1.18.4 and Python 3.8. These are the latest as of 5/2020 I think. I get the error:
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.8 from "C:\Users\SScott1\.conda\envs\cartoenv7_3_8\python.exe"
* The NumPy version is: "1.18.4"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found.
Is there a place I can report this? How do I resolve this error.
This happens when you launch VS Code outside of Anaconda Navigator.
This question already has a few answers here and here. Adding this to the environment path worked for me:
C:\Users\ <username> \Anaconda3\Library\bin

Cannot find module PIL in Python

I am using:
Thonny Version 3.2.1
Python Version 3.7.0
PIP Version 19.2.3
Pillow Version 6.1.0
I am trying to import an image into my program and show it on the screen with the below code:
I get the error:
ModuleNotFoundError: No module named 'PIL'
backend.py, line 276
I believe the problem isn't my code, but instead an issue with the module Pillow not being found by Python?
Can anyone please help with a fix? I can clarify any info needed.
Additionally, I am new to Python and so go easy on me :-) Apologies if any of my terminology is incorrect.
I have tried:
1\ Removing PIL as per the install warning from Pillow (PIL Fork) install info. It was not present on my system. I did this through CMD.
2\ I always access CMD as the administrator.
3\ Updating all program versions above through CMD.
4\ Info I’ve found shows the above versions are compatible.
5\ Using the code help('modules') to show available modules, it does not show 'PIL' or 'Image', but does show 'pip'.
6\ Checked many forums for other fixes.
from PIL import Image
im = Image.open("JC.png")
im.show()

Missing package to enable rendering OpenAI Gym in Colab

I'm attempting to render OpenAI Gym environments in Colab via a Mac using the StarAI code referenced in previous questions on this topic. However, it fails. The key error (at least the first error) is shown in full below, but the import part seems to be "Please install xdpyinfo!"
PyPI doesn't have xdpyinfo. What is it and how do I install it?
Full error message:
482780428160 abstractdisplay.py:151] xdpyinfo was not found, X start can not be checked! Please install xdpyinfo!
I've seen the same error, and solved it by installing x11-utils package which includes xdpyinfo command.
!apt-get install x11-utils

OpenAI Gym error running demo from intro page

I installed OpenAI Gym and attempted to run the getting-started cart-pole demo (https://gym.openai.com/docs/). (I'm running in a Colab notebook.)
import gym
env = gym.make('CartPole-v0')
env.reset()
for _ in range(1000):
env.render()
env.step(env.action_space.sample()) # take a random action
This doesn't learn, but it should display the cart and pole.
When I run it I get a warning and an error.
WARN: gym.spaces.Box autodetected dtype as <class 'numpy.float32'>. Please provide explicit dtype.
The error is triggered by env.render(). At the bottom of the Traceback is
Error occured while running `from pyglet.gl import *`
The original exception was:
ImportError: Library "GL" not found.
I had installed pyOpenGL with the following.
!pip install PyOpenGL PyOpenGL_accelerate
I'd appreciate help with both the warning and the error. Is there another GL library I should install?
Thanks.
Google Colab is run in the cloud. It can't send the graphic display back to your monitor.
You can try running it with local runtime.
https://research.google.com/colaboratory/local-runtimes.html
Do you get this window?
If yes then try to add this import:
import time
and this line of Code within the for-loop:
time.sleep(0.3)
Thing is that the pole runs out of view rather quick, so it seems like
the Environment did not run at all.