`No module named 'X'`
It seems that external dependencies aren't being indexed correctly in my PyCharm
for example `pandas` and `torch` will trigger the `No module named` inspection, but none of the others will
import argparse
import json
import os
import pickle
import sys
import pandas as pd
import torch
However, they are installed in my `virtualenv` environment

Please sign in to leave a comment.
Have you tried File | Invalidate Caches/Restart... | Invalidate and Restart?
What PyCharm version do you use?
Thank you Sergey
> Have you tried File | Invalidate Caches/Restart... | Invalidate and Restart?
yes
> What PyCharm version do you use?
How did you create this virtual environment?
Does the same problem appear with a virtualenv created by PyCharm? https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html
Thanks Sergey,
I used pipenv to create the environment. The pipenv tool in PyCharm assumes you want PyCharm to create the environment, so instead I used the virtual environment that pipenv uses under the hood as the Python Interpreter.
I would prefer not to create the virtual env in that way since I use pipenv. The pipenv with PyCharm doesn't work for my use case because it throws an error since the environment is already created.
Is there any other information I could share with you that would be useful for debugging this issue?