ModuleNotFoundError:没有名为“Snokel.labeling”的模块

2024-09-27 17:48:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用conda安装了Snokel,当我尝试运行-from snorkel.labeling import labeling_function时,它抛出以下错误-ModuleNotFoundError: No module named 'snorkel.labeling'

我尝试在Github上查找解决方案,但不幸的是,我无法完成。我还尝试安装了nb_conda_kernels,以使您的所有conda环境在Jupyter中可用,但没有任何帮助。还尝试创建一个单独的环境,安装Snokel并从Snokel的环境中启动jupyter笔记本,但也没有成功。非常感谢任何形式的帮助

提前谢谢


Tags: nofromimportgithub环境错误function解决方案
2条回答

请尝试以下操作:

适用于pip用户

pip install snorkel

康达用户

conda install snorkel -c conda-forge

试试these install instructions

conda create  yes -n snorkel
conda activate snorkel
conda install pytorch==1.1.0 -c pytorch
conda install snorkel==0.9.0 -c conda-forge

或者这些listed here

# [OPTIONAL] Activate a virtual environment
conda create  yes -n spam python=3.6
conda activate spam

# Install requirements (both shared and tutorial-specific)
pip install environment_kernels
# We specify PyTorch here to ensure compatibility, but it may not be necessary.
conda install pytorch==1.1.0 -c pytorch
conda install snorkel==0.9.5 -c conda-forge
pip install -r spam/requirements.txt

# Launch the Jupyter notebook interface
jupyter notebook spam

相关问题 更多 >

    热门问题