Hello,

I am new at using Open Babel software. My intention is to use "Pybel" to
calculate structural similarity.

First, I have installed Pybel for Python 3 this way:

$> pip3 install pybel

However, I cannot use the function "readstring":

$> python3
>>> import pybel
>>> smiles = ['CCCC', 'CCCN']
>>> mols = [pybel.readstring("smi", x) for x in smiles] # Create a list of
two molecules
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in <listcomp>
AttributeError: module 'pybel' has no attribute 'readstring'

Do you know why is this happening?

The other problem is that I am interested in using Pybel in Python 2.7.
However, I cannot successfully run it. I install it properly this way:

$> pip install pybel

But then, when importing it, I get the following error:

$> python
>>> import pybel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/pybel/__init__.py", line 54, in
<module>
    from . import io
  File "/Library/Python/2.7/site-packages/pybel/io.py", line 31, in <module>
    from .canonicalize import decanonicalize_node
  File "/Library/Python/2.7/site-packages/pybel/canonicalize.py", line 9,
in <module>
    from .parser.language import rev_abundance_labels
  File "/Library/Python/2.7/site-packages/pybel/parser/__init__.py", line
8, in <module>
    from .parse_bel import BelParser
  File "/Library/Python/2.7/site-packages/pybel/parser/parse_bel.py", line
15, in <module>
    from .baseparser import BaseParser, WCW, nest, one_of_tags, triple
  File "/Library/Python/2.7/site-packages/pybel/parser/baseparser.py", line
22, in <module>
    quote = dblQuotedString().setParseAction(removeQuotes)
TypeError: __call__() takes exactly 2 arguments (1 given)

Do you know what could be the reason of these errors? It would be very
interesting for me to be able to use this package.

Thank you very much,

Quim

-- 

*Joaquim Aguirre Plans*
Researcher in the Structural Bioinformatics Laboratory (DCEXS-UPF)
Student of the MSc Bioinformatics for Health Sciences (UPF/UB)
Graduate in Biotechnology (UAB), specialization in Biotechnology of
Processes
[Tel.] +34 692 352 112
quim.agui...@gmail.com
joaquim.agui...@upf.edu
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to