ModuleNotFoundError: No module named 'skimage' when already installed new version scikit-image - scikit-image

I want to ask that I face the problem:
ModuleNotFoundError: No module named 'skimage'
even though I have already pip3 install scikit-image.
1
my version is Python 3.7.2
and when typing pip3 list, the version is:
scikit-image 0.17.2
Does any one know how to solve this problem?
Thank you very much

scikit-image and scikit-learn are two different packages. The latest scikit-image version is 0.17.2. Are you sure you have installed scikit-image?

It also depends wether you are on a Anaconda plateform or a local python platform in your computer (c:\User....). If python is installed directly in your computer outside Anaconda, this error may occur when importing the scikit-image library. In such case, you should re-install the scikit-image library from the Anaconda plateform by typing the command 'conda install scikit-image' from the Ananconda prompt or terminal.

Related

Is there new version of pygame for anaconda env?

I have pygame in pip environment and used it without problem.
But now I switched to conda environment (called tf-gpu) to have TF features also.
As I figured out the most used channel for conda version of pygame is cogsci.
But conda install -c cogsci pygame in terminal causes an error:
It seems there is a version incompatibility.
I then downloaded the original tar.bz2 file from conda, and tried conda install --offline C:\...(file path)
It downloaded and recognized by interpreter(python 3.8.8, conda('tf_gp' env)).
Then Pyhton imported pygame but error of there is no module "from python.base import *" proceeded it.(as it is in the __init__ file of package)
Are these problem due to old version of pygame? I tried other channels in anaconda but unsuccessful(also they were older).
And also i can not downgrade python because of many packages' prerequisites.
I also tried installing via pip(in that conda promp), but it said that the requirment has been satisfied(as i previoisly used pygame in pip env(python 3.8.2).
Is there any new conda version of pygame?
Should i remove previous pygame in pip and try pip install again in conda env?
Or is it possible to modify main package source code(old file)?
This issue usually comes in when you are running many versions of python and pygame together which causes some incompatibility. Another problem which may occur is that anaconda environment stop recognising the pygame as it can’t locate it.
My suggestion is that uninstall all the older versions of python and pygame and install the latest ones.
Or else you may shift to Visual studio code for better experience and lesser problems.
Thanks,
The problem was solved by uninstalling other python version that I had(3.6). and using pip version of pygame(which did not work when two python versions (3.6, 3.8) were on my system.)

difference between conda install and pip install in jupyter notebook

I'm a little confused with package install in anaconda environment.
I can install my python packagse in the following ways.
open anaconda prompt and do : conda install tensorflow
launch an jupyter notebook from anaconda prompt, choose the default python kernel, and do:
!pip install tensorflow
Can someone tell me what is the difference between these two cases? Where are the python packages installed? What happens when I pip install python packages in default kernel in jupyter notebook?
I was able to install tensorflow in jupyter notebook in default kernel (python3), but trying to import tensorflow give me module note found error. Does anyone know why that happened? What is happening under the hood? Very much appreciate any help to clarification.
pip is the default package manager that ships with python. Conda is also a package manager, but it is third party. Conda was made especially for data science libraries. Libraries installed with conda usually give much better performance than pip. In pip, the packages are stored in python/scripts and conda stores them at /anaconda/pkgs/. As for the module not found error. I would need more information about it, but you can check out this video. I learnt how to install TensorFlow here and would highly recommend it.

Unable to open h2o in anaconda

after following the instruction in http://docs.h2o.ai/h2o/latest-stable/h2o-docs/downloading.html#install-in-python, I was able to install h2o v 3.16.0.2. I was also able to use command line instructions mentioned in the above website and test that it is working.
python
import h2o
h2o.init()
h2o.demo("glm")
However, when I launch anaconda spyder, I am not able to import h2o. How do I link the h2o I have installed and bring it into Spyder python?
Update:
I have already tried {conda install -c anaconda h2o } which is mentioned on Anaconda.org, but that installs older ver 3.10 of h2o and that did not work either.
thanks for your help.
I believe the problem is due to your python environment. When you install Anaconda, you need to use anaconda pip, to ensure that the installed packages are available in conda.
The short answer is you can install the lastest stable version of H2O (3.16.0.2 as of today) using conda via h2oai channel instead of anaconda channel (h2o maintains it's own channel):
conda install -c h2oai h2o
this should solve your issue.
But more generally, the packages will appear in conda if you use anaconda pip. You can check which pip is being used by doing
which pip
and making sure that the path to the pip is within your anaconda distribution; something like /home/<userdir>/anaconda/bin/pip instead of /usr/bin/pip
Same is true also for Python. Try checking if starting Python in terminal points to anaconda Python by doing which python. If that's not the case, than you would need to add the conda installation of Python to your PATH variable. Please refer to conda docs for instructions https://conda.io/docs/user-guide/install/index.html
It would have been helpful if you had included information regarding your operating system in the question.

How to install ipdb with Anaconda on Windows?

I already have Python 2.7 installed but I wanted to try IPython so I installed IPython via Anaconda as recommended on the ipython website (although not sure what the pros/cons of doing this are). Now I would like to use ipdb debugger. I guess I need to make sure it installs underneath the Anaconda version of python rather than the normal python.
How do I install this? In general if I want to install some arbitrary python module under Anaconda how do I do this?
Actually I think in the case of ipdb it's already installed with Anaconda. But in general it appears you can just install stuff via either pip or easy_install as necessary. The key that I was missing is to make sure you are using the pip/easy_install that comes with Anaconda (which are .bat files in the Scripts directory) rather than the system Python's pip/easy_install. So:
Anaconda\Scripts\easy_install somepackage
This will install somepackage in Anaconda\lib\site-packages\ and not in the system python. This appears to work and I can now import somepackage from my anaconda python. This seems to work. It wasn't clear to me from reading Anaconda documentation if everything needed to be in a conda package or not.
This answer seems to support this idea: Installing Anaconda into a Virtual Environment
Generally the first thing to check is whether someone else has already built it for your version of python and uploaded it to anaconda.org:
anaconda search -t conda ipdb
then find a repository with ipdb built for your OS, and try
conda install -c <repository> ipdb
e.g. conda install -c conda-forge ipdb
You might need to try a few different ones to find one built for your version of python. There is a feature request to make this easier.
If that doesn't work, then pip install ipdb will

can't install scipy on mac OS X

I have numpy and matplot installed and working properly with python 2.7, but when I use pip to install scipy, I get this error.
numpy.distutils.npy_pkg_config.PkgNotFound: Could not find file(s) ['/usr/local/lib/python2.7/site-packages/numpy/core/lib/npy-pkg-config/npymath.ini']
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /var/folders/61/dpn0d5p51z19g5vypnmh3vfh0000gn/T/pip-build/scipy
There is no end to the amount of grief that you can run into when trying to install numpy, scipy, and matplotlib on Mac OS X. If you want to stay on the bleeding edge I would suggest downloading the git repositories and building each one.
If you don't need to be on the bleeding edge I would suggest, following the instructions on the SciPy web site:
http://www.scipy.org/Installing_SciPy/Mac_OS_X
Finally, there is the great work that Chris Fonnesbeck: At https://github.com/fonnesbeck/ScipySuperpack
The Fonnesbeck method has never failed for me.
I also was not able to install scipy using pip. However an option that has worked for me was using the .dmg package provided by scipy.org.
Important: you will have to update to the latest version of python in your Mac OS. That is, you can still use the Python 2.7, however it is necessary to update to the latest build which you can download at python.org.
I could suggest you to use some package manager for Mas OS X (for example macports). Using a kind of such system could avoid you from such things like manual resolving of dependencies, and so on.

Resources