Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
92 views
in Technique[技术] by (71.8m points)

python 3.x - I cannot import lightfm

.I am writing my first machine learning program. I am using Python 3.8.5 in Windows and trying to import lightfm.

After running "pip install scipy" / "conda install scipy" and running :

C:UsersOscaranaconda3Libsite-packageslightfm>python test_imp_lightfm.py

But I get this error even though scipy is installed -

  File "test_imp_lightfm.py", line 1, in <module>
    **import lightfm as LightFM**
  File "C:UsersOscaranaconda3Libsite-packageslightfmlightfm.py", line 6, in <modul e>
    import scipy.sparse as sp
**ModuleNotFoundError: No module named 'scipy'**

**pip list  shows:**
libarchive-c                       2.9
**lightfm                           1.16**
llvmlite                                0.33.0+1.g022ab0f
locket                                 0.2.0
....
numpy                           1.19.5
numpydoc                          1.1.0
.....                        
scikit-image                     0.16.2
scikit-learn                       0.20.3
**scipy                             1.6.0**
seaborn                            0.11.1
Send2Trash                      1.5.0
setuptools                         49.2.0.post20200714

I need help to solve this problem

question from:https://stackoverflow.com/questions/65713075/i-cannot-import-lightfm

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...