在Google Colab中安装RDKit [英] Installing RDKit in Google Colab
问题描述
我不知道如何解决以下问题.直到今天,我仍在使用以下代码段在Google Colab中安装RDKit:
I cannot figure out how to fix the following issue. Up until today I was using the following code snippet for installing RDKit in Google Colab:
!wget -c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
!chmod +x Miniconda3-latest-Linux-x86_64.sh
!time bash ./Miniconda3-latest-Linux-x86_64.sh -b -f -p /usr/local
!time conda install -q -y -c conda-forge rdkit
import sys
sys.path.append('/usr/local/lib/python3.7/site-packages/')
但是,今天我开始出现以下错误:
However, today I started to get the following error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-d24c24e2d1f9> in <module>()
----> 1 from rdkit import Chem
2 import networkx as nx
ModuleNotFoundError: No module named 'rdkit'
我尝试使用完整的Anaconda发行版代替Miniconda,并将python版本更改为3.6和3.8,但似乎无济于事.
I've tried using the full Anaconda distribution instead of Miniconda, as well as changing the python version to 3.6 and 3.8 but nothing seems to work.
推荐答案
我认为您在安装Miniconda时需要指定python 3.7(当前rdkit版本支持python 3.7),最新的Miniconda版本为py3.8:>
I think you need to specify python 3.7 when you install Miniconda (the current rdkit build supports python 3.7), the latest Miniconda version is py3.8:
!wget -c https://repo.continuum.io/miniconda/Miniconda3-py37_4.8.3-Linux-x86_64.sh
!chmod +x Miniconda3-py37_4.8.3-Linux-x86_64.sh
!time bash ./Miniconda3-py37_4.8.3-Linux-x86_64.sh -b -f -p /usr/local
!time conda install -q -y -c conda-forge rdkit
import sys
sys.path.append('/usr/local/lib/python3.7/site-packages/')
https://colab.research.google.com/drive/1MAZyv3O4-TrI8c1MD4JVmwExDquaprRT?usp = sharing
这篇关于在Google Colab中安装RDKit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!