No module found error for every conda package in anaconda jupyter notebook

梦想与她 提交于 2019-12-23 03:24:21

问题


After installing scikit learn latest version 19 using conda in anaconda jupyter ,all package showing no module found error - scikit learn , numpy ,matplotlib etc NO module found erroe for all conda package after uninstalling and reinstallling its has same module problem

my kerenel specs sana@skb-linux:~$ . activate my_env (my_env) sana@skb-linux:~$ jupyter kernelspec list Available kernels: python3 /home/sana/anaconda3/envs/my_env/share/jupyter/kernels/python3

my code # scipy import scipy print('scipy: %s' % scipy.version) ModuleNotFoundError Traceback (most recent call last) in () 1 # scipy ----> 2 import scipy 3 print('scipy: %s' % scipy.version)

ModuleNotFoundError: No module named 'scipy'


回答1:


You can check for the install packages by typing !conda list in the notebook and check for scikit-learn package is there or not. If it's not present then you can install it by !pip install scikit-learn or !conda install -c anaconda scikit-learn

later try import sklearn it should work!.

There is a useful source here, including how to update or upgrade packages..




回答2:


final solution: first need activate the environment you are working and install conda package in that particular environment using conda install and do need not to install outside of your environment

sana@skb-linux:~$ . activate my_env (my_env) sana@skb-linux:~$ conda install scikit-learn Solving environment: done

so the sklearn package is installed in your particular environment(in my case its installed my_env)



来源:https://stackoverflow.com/questions/52096590/no-module-found-error-for-every-conda-package-in-anaconda-jupyter-notebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!