Dear Jessica,

The problem is that PYTHONPATH and LD_LIBRARY_PATH are not set for your 
IDLE session. This is probably because you set your variables in your 
.bashrc and then you are starting IDLE from your GNOME/KDE start menu, 
so .bashrc is not sourced. If you start your IDLE session from your 
terminal, everything should work. Alternatively, you may set your 
PYTHONPATH and LD_LIBRARY_PATH in a place where KDE and GNOME can source 
them; check 
http://superuser.com/questions/121261/how-can-i-set-environment-variables-for-a-graphical-login-on-linux
 
for how to do that.

As a (rather awful) workaround, you may echo $LD_LIBRARY_PATH in your 
terminal, and add the following in your Python script:

sys.path.append('/opt/rdkit-Release_2016_03_1')
os.environ['LD_LIBRARY_PATH'] = 'value of LD_LIBRARY_PATH shown in the 
terminal'

But it would be far better to fix your environment variables before 
starting IDLE.

Cheers,
p.

On 07/20/16 09:51, Jessica Krause wrote:
> Hello David,
>
> it shows:
>
>   >>> import os
>   >>> os.environ["PYTHONPATH"]
>
> Traceback (most recent call last):
>     File "<pyshell#4>", line 1, in <module>
>       os.environ["PYTHONPATH"]
>     File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
>       raise KeyError(key)
> KeyError: 'PYTHONPATH'
>
>
> And Paolo gave me yesterday the hint to add the following:
>
> import sys
> sys.path.append('/opt/rdkit-Release_2016_03_1')
>
>
> but then I get the following error:
>
>   >>> import sys
>   >>> sys.path.append('/opt/rdkit-Release_2016_03_1')
>   >>> from rdkit import Chem
>
> Traceback (most recent call last):
>     File "<pyshell#7>", line 1, in <module>
>       from rdkit import Chem
>     File "/opt/rdkit-Release_2016_03_1/rdkit/Chem/__init__.py", line 18,
> in <module>
>       from rdkit import rdBase
> ImportError: libRDBoost.so.1: cannot open shared object file: No such
> file or directory
>
> But in Terminal and IPython console/notebook everything works fine. I
> don't know what exactly is set wrong or installed wrong.
>
>
> On 19.07.2016 18:42, David Hall wrote:
>> what does os.environ["PYTHONPATH”] show when you are in IDLE?
>>
>>
>>> On Jul 19, 2016, at 12:26 PM, Jessica Krause <jessica.kra...@tu-bs.de> 
>>> wrote:
>>>
>>> Dear All,
>>>
>>> I installed the new release of Rdkit in Ubunutu 16.04. I am not able to
>>> import rdkit module in my IDLE and Spyder after installing the new
>>> release 2016.
>>> It works in terminal and Ipython Notebook but shows error in IDLE and
>>> Spyder.
>>>
>>> In Terminal:
>>>
>>> Python 2.7.12 (default, Jul  1 2016, 15:12:24)
>>> [GCC 5.4.0 20160609] on linux2
>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>> from rdkit import rdBase
>>>>>> print rdBase.rdkitVersion
>>> 2016.03.1
>>>>>> import os
>>>>>> os.environ["PYTHONPATH"]
>>> '/opt/rdkit-Release_2016_03_1:'
>>> In IDLE/Spyder:
>>>
>>> Python 2.7.12 (default, Jul  1 2016, 15:12:24)
>>> [GCC 5.4.0 20160609] on linux2
>>> Type "copyright", "credits" or "license()" for more information.
>>>>>> from rdkit import rdBase
>>> Traceback (most recent call last):
>>>     File "<pyshell#0>", line 1, in <module>
>>>       from rdkit import rdBase
>>> ImportError: No module named rdkit
>>>
>>> Can somebody help me with this!
>>>
>>>
>>> Thanks & Regards,
>>>
>>> Jessica
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
>>> patterns at an interface-level. Reveals which users, apps, and protocols are
>>> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
>>> J-Flow, sFlow and other flows. Make informed decisions using capacity 
>>> planning
>>> reports.http://sdm.link/zohodev2dev
>>> _______________________________________________
>>> Rdkit-discuss mailing list
>>> Rdkit-discuss@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to