Python Forum
rdkit installed but not imorted
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rdkit installed but not imorted
#11
Thank you.

Perhaps some files in the rdkit-map are missing?

Perhaps rdkit isn't "visible" for the program due to an erroneous path?
Reply
#12
I still have problems with importing rdkit!

I have a map "rdkit" at this location:
C:\Users\Lars\anaconda3\envs\my-rdkit-env\Lib\site-packages\rdkit

I try to run my program in PyCharm but I have also opened a Python interpreter to laborate with:
The interpreter is in an Anaconda Prompt (anaconda3)
I change dir to "site-packages" and verify:
>>> os.getcwd()
'C:\\Users\\Lars\\anaconda3\\envs\\my-rdkit-env\\Lib\\site-packages'

Then I try to import rdkit. It is found but I still have a problem:
>>> import rdkit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Lars\anaconda3\envs\my-rdkit-env\Lib\site-packages\rdkit\__init__.py", line 2, in <module>
from .rdBase import rdkitVersion as __version__
ImportError: Module use of python36.dll conflicts with this version of Python.

The file "__init__.py" is very short and looks like this:
try:
from .rdBase import rdkitVersion as __version__
except ImportError:
__version__ = 'Unknown'
raise

So when I start from dir "\site-packages" the "rdkit" is found but there is an error due to
version of Python

To verify that I have Python3:
>>> import sys
>>> sys.version
'3.8.3 (default, Jul 2 2020, 17:30:36) [MSC v.1916 64 bit (AMD64)]'
>>>
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020