![](/img/trans.png)
[英]Use pyarrow in Glue pythonshell - ModuleNotFoundError: No module named 'pyarrow.lib'
[英]ModuleNotFoundError: No module named 'pyarrow.lib'
这是完整的错误消息。
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
我正在为一个项目使用 streamlit,但无法解决这个问题。 我曾尝试卸载并重新安装 streamlit,但这没有帮助。
我使用 python 3.8
卸载并重新安装为我解决了这个问题:
pip uninstall pyarrow
pip install pyarrow
我想我在我的 Conda 环境中更改了 Python 版本,把事情搞砸了。
你需要安装pyarrow
python3 -m pip install pyarrow
检查这两件事(对我有用)-
1-如果您最近更改了 python 版本,请卸载所有库,然后安装。(可以通过pip uninstall -r requirements.txt -y
& 然后pip install -r requirements.txt -y
轻松完成
2- 如果您在不同的环境中安装了 pyarrow。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.