我使用conda安装了呼吸管,当我尝试运行时-from snorkel.labeling import labeling_function
会引发以下错误-ModuleNotFoundError: No module named 'snorkel.labeling'
。
我试图在Github上寻找解决方案,但不幸的是,我无法跟进。我还尝试安装nb_conda_kernels
,以使所有的conda环境都可以在jupyter中使用,但这没有帮助。还尝试创建一个单独的环境,安装通气管并从通气管环境中启动jupyter笔记本,但这也没有用。任何形式的帮助都将不胜感激!
谢谢!
答案 0 :(得分:0)
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
答案 1 :(得分:0)
请尝试以下操作:
pip install snorkel
conda install snorkel -c conda-forge