I am having an issue with my modules showing up. I am trying to import pydock but it is not showing. This is my import statements I have at the top of my code:
import pydock
but when I run the code I get this error:
ModuleNotFoundError: No module named 'pydock'
so then to check if there is pydock in the terminal i run:
which pydock
which gives me:
/opt/anaconda3/bin/pydock
and when I say which python:
/opt/anaconda3/bin/python
I get this again. BUT when I run my code I still get my error. So then I was trying to see what python was being run so I added this to the top of my code.
import sys
print("THIS IS THE PATH:::::")
print(sys.path)
I get:
(base) Carmens-MacBook-Pro-2:predictingDrugBindingAffinities CarmenLaptop$ /usr/bin/python3 /Users/CarmenLaptop/Desktop/coding/predictingDrugBindingAffinities/parseLigandStructure.py
THIS IS THE PATH::::: ['/Users/CarmenLaptop/Desktop/coding/predictingDrugBindingAffinities', '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python39.zip', '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9', '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/lib-dynload', '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages'] Traceback (most recent call last): File "/Users/CarmenLaptop/Desktop/coding/predictingDrugBindingAffinities/parseLigandStructure.py", line 7, in <module> import pydock ModuleNotFoundError: No module named 'pydock'
Which looks crazy to me, and I am not sure what is going on but it doesn’t seem like it is running from anaconda? Where I was trying to set up a package there? I am worried I have multiple python versions on my computer? I have installed pydock both on the environment in anaconda, and using pip install for a general installation. I would be so grateful for someone to explain to me why my modules aren’t working!! Thank you so much!
I was expecting for it to run my full code, and have all of my modules there, but it does not. I tried looking to see where pydock is located, where it is running from, doing conda actviate myenv to get the enviroment started. I am editing everything in VS code is that helps!
Carmen Montero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.