访问随Brew安装的Python模块

时间:2020-03-19 20:11:58

标签: python homebrew rdkit

我试图在python中访问“ rdkit”模块,但是我的python安装似乎找不到该模块。我按照建议的here使用brew安装了它。我提供了用于重现该问题的命令。

是否只需将“ / usr / local / Cellar”添加到python路径即可,这是一个简单的修复方法吗? Symlinc现场包装到地窖?坦率地说,我在更新python时不了解pip和brew之间的区别,所以我首先想到的是python路径不正确。任何建议,不胜感激。

X:~\ python3 Python 3.8.1 (v3.8.1:1b293b6006, Dec 18 2019, 14:08:53)  [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information.
>>> import rdkit Traceback (most recent call last):   
File "<stdin>", line 1, in <module> 
ModuleNotFoundError: No module named 'rdkit'

X:~\ which python3
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3

X:~\ python3
Python 3.8.1 (v3.8.1:1b293b6006, Dec 18 2019, 14:08:53) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.path)
    ['', 
'/Library/Frameworks/Python.framework/Versions/3.8/lib/python38.zip', 
'/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8', 
'/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload', 
'/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages']



**@:/usr/local/Cellar\** ls
boost/         gettext/       libffi/        numpy/         sip/
boost-python3/ glew/          libidn2/       openblas/      sqlite/
cmake/         glib/          libmpc/        openssl@1.1/   tcl-tk/
ddclient/      glm/           libpng/        pandoc/        tree/
eigen/         gmp/           libtiff/       pcre/          webp/
fontconfig/    graphviz/      libtool/       pkg-config/    wget/
freeglut/      gts/           libunistring/  pyqt/          xz/
freetype/      icu4c/         mmtf-cpp/      python/
gcc/           isl/           mpfr/          qt/
gd/            jasper/        msgpack/       **rdkit/**
gdbm/          jpeg/          netpbm/        readline/

详细信息: Catalina操作系统:10.15.3

0 个答案:

没有答案