Addy
Addy

Reputation: 71

ModuleNotFoundError: No module named 'pyarrow.lib'

This is the full error message.

Traceback (most recent call last):
  File "C:\Users\adi\OneDrive\Desktop\Python310\machine learning project.py", line 3, in <module>
    import streamlit as st
  File "C:\Users\adi\OneDrive\Desktop\Python310\lib\site-packages\streamlit\__init__.py", line 70, in <module>
    from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
  File "C:\Users\adi\OneDrive\Desktop\Python310\lib\site-packages\streamlit\delta_generator.py", line 19, in <module>
    from streamlit import cursor, caching
  File "C:\Users\adi\OneDrive\Desktop\Python310\lib\site-packages\streamlit\cursor.py", line 18, in <module>
    from streamlit.scriptrunner import get_script_run_ctx
  File "C:\Users\adi\OneDrive\Desktop\Python310\lib\site-packages\streamlit\scriptrunner\__init__.py", line 16, in <module>
    from .script_runner import (
  File "C:\Users\adi\OneDrive\Desktop\Python310\lib\site-packages\streamlit\scriptrunner\script_runner.py", line 35, in <module>
    from streamlit.state import (
  File "C:\Users\adi\OneDrive\Desktop\Python310\lib\site-packages\streamlit\state\__init__.py", line 27, in <module>
    from .session_state_proxy import (
  File "C:\Users\adi\OneDrive\Desktop\Python310\lib\site-packages\streamlit\state\session_state_proxy.py", line 24, in <module>
    from streamlit.type_util import Key
  File "C:\Users\adi\OneDrive\Desktop\Python310\lib\site-packages\streamlit\type_util.py", line 22, in <module>
    import pyarrow as pa
  File "C:\Users\adi\OneDrive\Desktop\Python310\lib\site-packages\pyarrow\__init__.py", line 65, in <module>
    import pyarrow.lib as _lib

I am working with streamlit for a project but can't work out this problem. I have tried uninstalling and reinstalling streamlit but that did'nt help.

i using python 3.8

Upvotes: 5

Views: 12886

Answers (3)

Ajay Maurya
Ajay Maurya

Reputation: 1

Check these 2 things(worked for me) -

1-If you have changed your python version recently, uninstall all libraries then install.(can be done easily by pip uninstall -r requirements.txt -y & then pip install -r requirements.txt -y

2- If you have installed pyarrow in a different environment.

Upvotes: -1

Justin D. Harris
Justin D. Harris

Reputation: 2275

Uninstalling and re-installing solved the issue for me:

pip uninstall pyarrow
pip install pyarrow

I think I messed things up by changing the Python version in my Conda environment.

Upvotes: 8

Nabil
Nabil

Reputation: 1278

You need to install pyarrow

python3 -m pip install pyarrow

Upvotes: 0

Related Questions