From: Richard M. R. <rma...@gm...> - 2016-12-02 14:40:34
|
Hi, Just to provide an update here, I have now verified that the problem is specifically with Open Babel version 2.4.1. After uninstalling OpenBabel and Pybel on the same machine, I was able to successfully install Open Babel 2.3.2 [ttp:// sourceforge.net/projects/openbabel/files/openbabel/2.3.2/OpenBabel2.3.2a_Windows_Installer.exe/download] and then Pybel 1.8, using the same installer I mentioned previously. [With regard to the need to elevate privileges with a separate ADMIN account, this did require me to manually update my SYSTEM path, locate C:\User\[ADMIN]\AppData\Roaming\OpenBabel-[version], move this to C:\User\[LOGIN ACCOUNT]\AppData\Roaming\OpenBabel-[version] and set a SYSTEM variable BABEL_DATADIR=C:\User\[LOGIN ACCOUNT]\AppData\Roaming\OpenBabel-[version]\data. This enabled use of obabel in a new [LOGIN ACCOUNT] command prompt but still generated the same import pybel error as before. So, although this is an added complication, it does not appear to be related to the problem importing pybel with OpenBabel-2.4.1 that I previously reported.] I checked the software was correctly installed and working as expected as follows: ------------------------------- C:\Users\prerlm>echo %BABEL_DATADIR% C:\Users\prerlm\AppData\Roaming\OpenBabel-2.3.2\data C:\Users\prerlm>obabel -V Open Babel 2.3.2 -- Oct 5 2012 -- 10:00:48 C:\Users\prerlm>python Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit ( Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pybel >>> mol = pybel.readstring('smi','CCCBr') >>> mol.write('inchi') 'InChI=1S/C3H7Br/c1-2-3-4/h2-3H2,1H3\n' >>> quit() C:\Users\prerlm>dir %BABEL_DATADIR%\mr.txt Volume in drive C is OSDisk Volume Serial Number is ECFC-1FAD Directory of C:\Users\prerlm\AppData\Roaming\OpenBabel-2.3.2\data 03/10/2012 09:50 4,295 mr.txt 1 File(s) 4,295 bytes 0 Dir(s) 308,117,536,768 bytes free C:\Users\prerlm> --------------------------------------- Best regards, Richard On Fri, Nov 18, 2016 at 8:30 PM, Richard Marchese Robinson < rma...@gm...> wrote: > Hi, > > I am trying to install OpenBabel 2.4.1 and Pybel 1.8 for Python 2.7.12 > (32-bit) under Windows 7. > > [Python was installed via the vanilla python-2.7.12.msi installer. This is > on a 'clean' machine, so there is no relation to the problem with > installing Pybel for Anaconda I reported last month: > https://sourceforge.net/p/openbabel/mailman/message/35429073/] > > I obtained the OpenBabel installer [OpenBabel-2.4.1-x86.exe] from here: > https://sourceforge.net/projects/openbabel/files/ > openbabel/2.4.1/OpenBabel-2.4.1-x86.exe/download > > I obtained the Pybel installer [openbabel-python-1.8.py27.exe] from here: > http://sourceforge.net/projects/openbabel/files/openbabel-python/1.8/ > At least when I run the cmd prompt in administrator mode (here, I should > clarify that I need to specify another ADMIN account to install software), > I can reproduce all of the expected output for Open Babel, as documented > here: https://openbabel.org/docs/dev/UseTheLibrary/PythonInstall.html > > However, when I try and import pybel into Python in the same cmd prompt > session, I get the following error: > ----------------------- > C:\windows\system32>python > Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 > bit ( > Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import pybel > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "C:\Python27\lib\site-packages\pybel.py", line 52, in <module> > import openbabel as ob > File "C:\Python27\lib\site-packages\openbabel.py", line 37, in <module> > _openbabel = swig_import_helper() > File "C:\Python27\lib\site-packages\openbabel.py", line 33, in > swig_import_hel > per > _mod = imp.load_module('_openbabel', fp, pathname, description) > ImportError: DLL load failed: The specified procedure could not be found. > >>> > ----------------------------- > > Thank you in advance for any assistance you have time to provide. > > Best regards, > > Richard > > > > > > > |