erdogant / pca

pca: A Python Package for Principal Component Analysis.
https://erdogant.github.io/pca
MIT License
284 stars 42 forks source link

Circular import issue #41

Closed Hendricks27 closed 1 year ago

Hendricks27 commented 1 year ago

To whom it may concern,

While I finished following your installation tutorial, I am stuck on importing the package. This is the only line in my script: from pca import pca

And here is the error. ImportError: cannot import name 'pca' from partially initialized module 'pca' (most likely due to a circular import)

I am using an m1 mac with python3.8 installed via conda and pip. I didn't use the github link tho.

Thanks!

erdogant commented 1 year ago

I am looking into it and I am puzzled because all the code is in pca.py. So I can not find anything that is circular in the code. I did make a very small update in the pca class (for which I do not think it must matter). Can you try whether this makes a difference?

install from github source:

pip install -U git+https://github.com/erdogant/pca
print(pca.__version__) # 1.9.1
Hendricks27 commented 1 year ago

Ughhhhhh. You are absolutely right. I get it now. I am an idiot. Thank you so much for your help!