4

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

ferdy
  • 4,396
  • 2
  • 4
  • 16
Addy
  • 61
  • 2
  • 6
  • It appears that pyarrow is not properly installed (it is finding some files but not all of them). How did you install pyarrow? Did you use pip or conda? Do you know what version of pyarrow was installed? – Pace May 10 '22 at 23:18

3 Answers3

5

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.

Justin Harris
  • 1,969
  • 2
  • 23
  • 33
  • Maybe know what this is doing before you do it. If you have pyarrow==3.0 in requirements.txt, and you install and reinstall like this, you're likely to get a pyarrow greater than version 11. – Tony Fraser Feb 07 '23 at 21:01
1

You need to install pyarrow

python3 -m pip install pyarrow
Nabil
  • 1,130
  • 5
  • 11
-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.