Hi,

If you do “import pybel” you have to use the module name for the readstring 
command, ie. pybel.readstring(). Another option is to do “from pybel import 
readstring”, depending on your use case.

Kind regards,
Fredrik

On 5 mars 2017 20:25 +0100, phuongdnp <[email protected]>, wrote:
> I have tried installing different version of python (2.7, 3.3, 3.6) and
> openbabel (2.3, 2.4) (Win 32bit) following these steps:
> - Install python
> - Install pip
> - Install pybel module
> - Install openbabel GUI and also openbabel module
> - Add the Environment variables to python folders
> I can use "import pybel" and "import openbabel" but when I run the examples
> (mol = readstring("smi", "CCCC") or readfile()) there always is an error
> "name 'readstring' is not defined"
> I have also tried other windows pc but the same thing happened.
> Please help me to fix this. I appreciate very much.
>
>
>
> --
> View this message in context: 
> http://forums.openbabel.org/Cannot-use-readstring-or-readfile-tp4659795.html
> Sent from the General discussion mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to