autodataming的个人博客分享 http://blog.sciencenet.cn/u/autodataming

博文

RDKIT安装在windows中为python2 和python3分别定义PYTHONPATH...

已有 8850 次阅读 2017-4-11 15:18 |系统分类:科研笔记

在windows中为python2 和python3分别定义PYTHONPATH环境变量。

我电脑中同时安装了Python2 和python3两个版本。


在sourceforge中下载编译好的rdkit版本

**https://sourceforge.net/projects/rdkit/files/?source=navbar  **


在安装rdkit的时候需要设置PYTHONPATH环境变量。官方提供的方法不适合我电脑多版本python共存的情况,因此我参考了一个新的方法 ( http://www.cnblogs.com/zhizouxiao/p/3236452.html  )。

2、修改PYTHONPATH

通过PYTHONPATH 中的任何 .pth 文件来添加pythonpath
比如我想添加/home/aa这个路径到pythonpath里,可以这样做:
1、新建一个文件,名字随便,但后缀名须是.pth,比如rdkit.pth;

2、内容直接输入“D:Python27Librdkit-Release_2017_03”(没有引号),如果有多个路径可以多行输入,但每行保证只有一个路径;

3、然后文件aa.pth保存到sys.path列表中的任一文件夹下D:Python27Libsite-packagesrdkit.pth,一般来说我们保存到site-packages;最后重启python就可以了。
然后查看sys.path列表就会发现,最后多了'D:Python27Librdkit-Release_2017_03'项。



---

Installation of RDKit binaries

  • Get the appropriate windows binary build from: https://github.com/rdkit/rdkit/releases

  • Extract the zip file somewhere without a space in the name, i.e. C:

  • The rest of this will assume that the installation is in C:RDKit_2015_09_2

  • Set the following environment variables:

  • RDBASE: C:RDKit_2015_09_2

  • PYTHONPATH: %RDBASE% if there is already a PYTHONPATH, put ;%RDBASE% at the end.

  • PATH: add ;%RDBASE%lib to the end

---

pybel中的SMARTS是阉割版本,rdkit是根据daylight中的smarts进行编写的,因此我想测试下RDKIT的smarts.

--------------------

从2019.03release rdkit 版本开始, 官方不再支持python 2. 是时候拥抱python3 丢弃Python 2了。

Dear all,

As I announced on the mailing list last year[1], we're going to be phasing
out support for Python2 in the RDKit:https://www.mail-archive.com/rdkit-discuss@lists.sourceforge.net/msg06935.htmlI originally planned to start this with the 2018.09 release, but let
inertia win and didn't make the change. Now it's starting.
What does that mean?
The 2018.09 release, which comes out next week, will be the last RDKit
release that adds new features for Python 2.The 2019.03 release will no
longer officially support Python 2. We will accept code changes that only
work with Python 3 and will, as time permits, start refactoring existing
code to take advantage of Python 3 features.
The 2018.09 release branch will continue to support Python 2 and I will
continue to apply bug fixes, whenever possible, to that branch. This may go
on until early 2020, but I reserve to right to stop doing that work (which
is going to be a slog) before 2020 if there's not demand being actively
expressed for it.[2]

What will actually happen in the near term?
Not much. The one immediate thing is that as soon as I finalize the 2018.09
release and create the corresponding release branch, I will remove the
Python2 testing from the travis build setup. We will also start accepting
code changes that only work with Python 3.




https://blog.sciencenet.cn/blog-950202-1048185.html

上一篇:PAINS结构汇总和调查
下一篇:第三方客户端登陆qq邮箱
收藏 IP: 58.32.236.*| 热度|

1 蒋德明

该博文允许注册用户评论 请点击登录 评论 (1 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-19 15:27

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部