Python Forum
rdkit installed but not imorted
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rdkit installed but not imorted
#1
Output when I try to run my program:

import rdkit
ModuleNotFoundError: No module named 'rdkit'

Process finished with exit code 1
Reply
#2
did you install it?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
I have Windows 10 and used conda to install rdkit

In my file structure I can now find:
...\anaconda3\envs\my-rdkit-env\Lib\site-packages\rdkit...
Reply
#4
I am not using anaconda, but from what you show it looks like it's installed in virtual environment my-rdkit-env. Is it activated when you run the code and get error?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#5
I'm new to Python3, anaconda3, conda, PyCharm, ...
so I don't understand exaktly what I'm doing ..
I followed instructions from the internet and was hoping for the best
I worked with this yesterday and did "activate" as I was prompted to
but don't know how to verify if I was successfull
Reply
#6
did you activate it also now? you need to activate when you want to use it.
I would suggest to check https://docs.conda.io/projects/conda/en/...ments.html
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#7
In an Anaconda Prompt (anaconda3):
(base) C:\Users\Lars>conda activate my-rdkit-env

(my-rdkit-env) C:\Users\Lars>

Was this the right thing to do?
Can I see if it is activated?

Same result as before when running program...
Reply
#8
(my-rdkit-env) means it's activated. I would expect it to work now. I don't know why you get same error
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#9
I can not import rdkit but I can import os:

(my-rdkit-env) C:\Users\Lars>py
Python 3.8.3 (default, Jul 2 2020, 17:30:36) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import rdkit
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'rdkit'

>>> import os
>>> os.getcwd()
'C:\\Users\\Lars'
>>>
Reply
#10
os is module from the Standard Library, i.e. no need to install it, it comes with python
maybe someone else will have better idea what may be wrong
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Forum Jump:

User Panel Messages

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