python - ModuleNotFoundError:没有名为“snorkel.labeling”的模块
问题描述
我使用 conda 安装了 snorkel,当我尝试运行时 - from snorkel.labeling import labeling_function
它会引发以下错误 - ModuleNotFoundError: No module named 'snorkel.labeling'
。
我尝试在 Github 上寻找解决方案,但不幸的是,我无法坚持到底。我还尝试安装nb_conda_kernels
, 以使您的所有 conda 环境在 jupyter 中可用,但没有帮助。还尝试创建一个单独的环境,安装 snorkel 并从 snorkel 的环境中启动 jupyter notebook,但它也不起作用。非常感谢任何形式的帮助!
提前致谢!
解决方案
试试这些安装说明:
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
或者这些,在这里列出:
# [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
推荐阅读
- xslt - 具有条件的先前同级的 XSLT 位置
- .net-core - OAuth 2.0 身份验证代码授权流程与客户端凭据授权流程
- animation - 如何将flare文件转换为mp4文件?
- node.js - Node js express 路由冲突问题
- python - 如何创建 n 个形状相同的矩阵
- reactjs - 反应钩子形式 - 填充选择许多选项数组
- reactjs - 关注动态生成的自定义输入
- spartacus-storefront - 横幅组件不会更改移动设备上的图像
- javascript - 如何将 express-fileupload 创建的缓冲区保存到文件中?
- android - AdMob 不会在 GDPR (IAB) 的情况下展示广告