Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot import FactorAnalyzer from module factor-analyzer-0.2.2

I installed the module factor-analyzer-0.2.2 but cannot import the function. My code is from factor_analyzer import FactorAnalyzer. I'm getting an error ModuleNotFoundError: No module named 'factor_analyzer'. I'm using Python 3.6 and Jupyter notebook. Do you know why this does not work? Thank you!!

like image 889
Lyudmyla Starostyuk Avatar asked May 04 '26 10:05

Lyudmyla Starostyuk


2 Answers

I had the same problem on Mac (python3). I launch Spyder 3.3.3 via Anaconda. In response to the following code:

from factor_analyzer import FactorAnalyzer

I received the following error:

ModuleNotFoundError: No module named 'factor_analyzer'

So, I opened Terminal (equivalent of Command Prompt on windows) and typed:

pip install factor_analyzer

Then, the problem was resolved.

like image 174
Azadeh Feizpour Avatar answered May 06 '26 23:05

Azadeh Feizpour


Use the anaconda prompt to run the pip install factor-analyzer rather than termainal or powershell. I had the same problem and doing that solved it for me.

like image 39
KevOMalley743 Avatar answered May 07 '26 00:05

KevOMalley743