In short: while mechanically possible, how is this better than
running conda directly?

As a two part MWE shared below, it is possible to redirect e.g.,
Debian's CPython interpreter into e.g., Miniconda's subfolder
containing the other interpreter and launch a script (e.g., loop.py)
residing in this very folder:

----8>< ---- sub_call.py ---- ----
# moderator file deposit for example on the Desktop
# call by
#
# python3 sub_call.py

import os
import subprocess as sub

os.chdir("/home/USERNAME/miniconda3/bin/")
sub.call("./python loop.py", shell=True)
print(os.getcwd())
----8>< ---- ----

---- 8>< ---- loop.py ----
# file moderated by above sub_call.py
# deposit in Miniconda as miniconda3/bin/loop.py

from rdkit import Chem

for i in range(3):
    print(i)

m2 = Chem.MolFromSmiles('C1CCC1')
print(Chem.MolToMolBlock(m2))
---- 8>< --- ----

However, a project design where one interpreter relays to an other
possibly demands more attention to organize and maintain than calling
the interpreter directly.  And according to time, overall performance
equally drops quite a bit.

Norwid


_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to