PyCharm ImportError - not recognizing external library
已回答
A sudden change today in working project. Started getting ImportError for a module that is shown in the ExternalLbraries of the project. Looking for troubleshooting strategy. I've tried 1) rebuilding venv 2) rebuilding project 3) lots of invalidate caches.

请先登录再写评论。
I am also having a similar problem. I am trying to use the xmla package. I have it installed, it shows up in my virtual environment, but when I attempt to import, I get an ImportError: No module named olap.xmla. ?
Hi! Try to exclude virtualenv folder in the project root with right click -> Mark Directory as ... -> Excluded. It may not help but it's a good practise anyway I believe.
Could you also check Run Configuration you are using to run the script. The problem may be - some different interpreter is selected to be used in it:
I don't have the virtualenv folder in the project root.
I am trying to do the following:
import olap.xmla.xmla as xmla
I get an ImportError olap.xmla not found.
Here is the virtualenv package list:

I believe that olap.xmla is being masked by the olap package. I can import olap interfaces just fine. How do I get around this masking. The olap package is required for the xmla package. It seems that it was supposed to be put into the other directory?