Ask the community or our support engineers for answers to questions.
When I run streamlit hello, it’s give me “ModuleNotFoundError: No module named ‘pyarrow.lib’” error. i tried to update my anaconda version and other things but still give me same error.
I have windows 10 OS
conda - 4.8.3
below is the full error message
(base) D:\Users\DGathani>streamlit hello
Traceback (most recent call last):
File “c:\program files (x86)\python37-32\lib\runpy.py”, line 193, in run_module_as_main
“main”, mod_spec)
File “c:\program files (x86)\python37-32\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "D:\Users\DGathani\AppData\Roaming\Python\Python37\Scripts\streamlit.exe_main.py", line 4, in
File “D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\streamlit\cli.py”, line 28, in
import streamlit.bootstrap as bootstrap
File “D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\streamlit\bootstrap.py”, line 29, in
from streamlit.server.Server import Server
File “D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\streamlit\server\Server.py”, line 41, in
from streamlit.components.v1.components import ComponentRegistry
File "D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\streamlit\components\v1_init.py", line 17, in
from .components import declare_component as declare_component
File “D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\streamlit\components\v1\components.py”, line 29, in
from streamlit.elements import arrow_table
File “D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\streamlit\elements\arrow_table.py”, line 17, in
import pyarrow as pa
File “D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\pyarrow_init_.py”, line 62, in
import pyarrow.lib as _lib
ModuleNotFoundError: No module named ‘pyarrow.lib’
Hello @digesh_gathani, welcome to the community !
Since you’re using Anaconda on Windows, could you try and create a new conda environment with Streamlit inside ? Hopefully it’ll correctly install pyarrow
there.
Fanilo
Hi andfanilo,
Thanks for quick reply. as you suggested, I tried to create new environment but no luck.
below same error.
(streamlit_env) D:\Users\DGathani>streamlit hello
Traceback (most recent call last):
File “c:\program files (x86)\python37-32\lib\runpy.py”, line 193, in run_module_as_main
“main”, mod_spec)
File “c:\program files (x86)\python37-32\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "D:\Users\DGathani\AppData\Roaming\Python\Python37\Scripts\streamlit.exe_main.py", line 4, in
File “D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\streamlit\cli.py”, line 28, in
import streamlit.bootstrap as bootstrap
File “D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\streamlit\bootstrap.py”, line 29, in
from streamlit.server.Server import Server
File “D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\streamlit\server\Server.py”, line 41, in
from streamlit.components.v1.components import ComponentRegistry
File "D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\streamlit\components\v1_init.py", line 17, in
from .components import declare_component as declare_component
File “D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\streamlit\components\v1\components.py”, line 29, in
from streamlit.elements import arrow_table
File “D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\streamlit\elements\arrow_table.py”, line 17, in
import pyarrow as pa
File “D:\Users\DGathani\AppData\Roaming\Python\Python37\site-packages\pyarrow_init_.py”, line 62, in
import pyarrow.lib as _lib
ModuleNotFoundError: No module named ‘pyarrow.lib’
Hmmm that’s odd, given the log
it does not look like streamlit
is called from your new conda environment.
- what happens when you run
where streamlit
andwhere python
in the terminal, with your conda environment activated ? - how did you install streamlit in the first place ? pip ?
- what happens if you force install
pyarrow
withpip install -U pyarrow
(still in your new conda environment) ? Does this at least work ?
Hi andfanilo,
once again thanks for reply.
point -1:
(streamlit_env) D:\Users\DGathani>where streamlit
D:\Users\DGathani\AppData\Roaming\Python\Python37\Scripts\streamlit.cmd
D:\Users\DGathani\AppData\Roaming\Python\Python37\Scripts\streamlit.exe
(streamlit_env) D:\Users\DGathani>where python
D:\Users\DGathani\AppData\Local\Continuum\anaconda3\envs\streamlit_env\python.exe
D:\Users\DGathani\AppData\Local\Continuum\anaconda3\python.exe
C:\Program Files (x86)\Python37-32\python.exe
Point-2:
Yes, using pip
Point-3:
(streamlit_env) D:\Users\DGathani>pip install -U pyarrow
Requirement already up-to-date: pyarrow in d:\users\dgathani\appdata\roaming\python\python36\site-packages (1.0.0)
Requirement already satisfied, skipping upgrade: numpy>=1.14 in d:\users\dgathani\appdata\local\continuum\anaconda3\envs\streamlit_env\lib\site-packages (from pyarrow) (1.19.1)
Should I uninstall streamlit and re-install again?
Hmm did you run pip install streamlit
inside your newly created streamlit_env
too ? Do you see streamlit when you run pip list
in your terminal with activated conda environment ?
At least python is correctly detected from your conda environment it’s the first line of the where python
As a very last resort, maybe check out echo %PATH%
to see if there’s a hardcoded path at the beginning to a Streamlit.cmd that is not inside D:\Users\DGathani\AppData\Local\Continuum\anaconda3\envs\streamlit_env
Hi andfanilo,
it’s working fine now, I uninstall streamlit from base environment and re-install from new environment, and magic happen.
Thank you for help ;)
Great have fun with Streamlit ! (and lots of conda environments)