Hi, I should have installed the correct one. But readstring() is not available.

>>> print pybel.__dict__.keys()
['to_bel_path', 'from_json', 'from_cx_path', 'utils', 'parser',
'__path__', 'manager', 'to_json', 'io', 'canonicalize', 'from_pickle',
'to_pickle', 'from_jsons', 'to_bytes', 'from_cx', '__all__',
'BELGraph', 'graph', 'from_cx_jsons', 'NDEX_SOURCE_FORMAT',
'__package__', 'to_bel', 'from_lines', 'from_cx_json', '__doc__',
'to_neo4j', '__title__', 'to_cx_json', '__license__', 'to_jsons',
'__builtins__', '__file__', 'to_cx_jsons', '__author__', 'to_csv',
'from_json_dict', 'from_path', '__name__', 'from_url', '__version__',
'constants', 'to_bel_lines', '__url__', '__copyright__',
'to_json_dict', '__description__', '__email__', 'to_cx',
'from_database', 'to_graphml', 'to_database', 'exceptions',
'database_io', 'from_bytes']

On Sun, May 7, 2017 at 9:20 PM, Hongbin Yang <yanyangh...@163.com> wrote:
> Hi, Peng,
>
>     I guess you installed pybel via `pip install pybel`, which is the
> "wrong" pybel (https://pypi.python.org/pypi/PyBEL/0.5.4 ) You should install
> openbabel and use it's pthon wrapper via `pip install openbabel`
> (https://pypi.python.org/pypi/openbabel/2.4.1 ).
>
> ________________________________
> Hongbin Yang
>
>
> From: Peng Yu
> Date: 2017-05-08 09:07
> To: openbabel-discuss
> Subject: [Open Babel] How to run readstring in pybel?
> Hi, I got the following error. Does anybody know what is wrong? Thanks.
>
> $ cat main.py
> #!/usr/bin/env python
>
> import pybel
> mymol = pybel.readstring("smi", "CCCC")
> print mymol.molwt
> $ ./main.py
> Traceback (most recent call last):
>   File "./main.py", line 5, in <module>
>     mymol = pybel.readstring("smi", "CCCC")
> AttributeError: 'module' object has no attribute 'readstring'
>
> --
> Regards,
> Peng
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



-- 
Regards,
Peng

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to