相关文章推荐
腼腆的柠檬  ·  python ...·  2 周前    · 
有情有义的大白菜  ·  python ...·  2 周前    · 
完美的馒头  ·  python QTreeWidget ...·  2 周前    · 
失眠的烤红薯  ·  python qt textBrowser ...·  2 周前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I installed in a local environment in anaconda (JupyterLab) the package kneed with the command conda install -c conda-forge kneed . Previously I installed in the same environment the packages jupyter,kneed, matplotlib, numpy, pandas ,seaborn, scikit-learn . While importing these modules in a jupyter notebook I get an error message saying that kneed is not installed:

ModuleNotFoundError: No module named 'kneed'

I have Python 3.9.7 installed.

To the contrary, when I check on the command line within the environment the same commands I have no problem. It seems as if Jupyter notebook is missing the information of the new installation of kneed. Do you have any suggestion ? Many thanks.

Thanks. I forgot to say that I already tried this, !pip install --upgrade kneed. It did not make any difference. – user249018 Apr 2, 2022 at 16:55 DO you start anaconda prompt with run as administrator? I don't know this work for your problem but when I can't install package, this way works. – Zeinab Mardi Apr 2, 2022 at 17:09 Please read carefully this document: docs.anaconda.com/anaconda/install/verify-install. if you works with Windows: Click Start, search, then select Anaconda Prompt from the menu and right click on and select Run as administrator when open anaconda prompt type: conda install -c conda-forge kneed then enter. – Zeinab Mardi Apr 2, 2022 at 17:39 Since you've tried other stuff, it wouldn't hurt to try in a cell in your notebook %conda install -c conda-forge kneed. And then try the import again to see if it worked. If it didn't work, then try in a cell in your notebook %pip install kneed. Please read about using the modern magics here. You no longer want to use an exclamation point with pip or conda when using them in a notebook. The newer, modern magics are more reliable. – Wayne Apr 3, 2022 at 3:08

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.