0

I was using scikit-image 0.18 version. To use seam_carve(), I have to downgrade it to 0.14.2 version.

Here was what I did:

  1. Firstly remove existing newer version 0.18
conda remove scikit-image

The following packages will be REMOVED:

  scikit-image-0.18.1-py38hf11a4ad_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

  1. after removing previous newer version, then I re-install scikit-image 0.14.2
pip install scikit-image==0.14.2

Requirement already satisfied: decorator>=4.3.0 in c:\users\test\miniconda3\envs\skimage14\lib\site-packages (from networkx>=1.8->scikit-image==0.14.2) (4.4.2)

The above said I have already have 0.14.2 version. The reason is that: before I removed newer version before, I was using

pip install --upgrade scikit-image==0.14.2 

It didn't work, that is why I started to use step 1 to uninstall it.

  1. then I tried to test which version is installed now
>>> import skimage
>>> print(skimage.__version__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'skimage' has no attribute '__version__'

skimage can be imported, but why I cannot check its version by using skimage.version

Thanks for your help

2
  • 1
    you probably have a skimage.py file that you're trying things in ? Commented Oct 3, 2021 at 23:34
  • What does dir(skimage) produce? Also, can you check the value of skimage.__file__? Commented Oct 3, 2021 at 23:47

1 Answer 1

1

__version__ is not a default for python, but is something that many libraries use. skimage version 0.18.3 uses it but version 0.14.2 doesn't necessarily use it.

This should help you find out the correct version:

https://stackoverflow.com/a/56331414

Sign up to request clarification or add additional context in comments.

5 Comments

Curiously, the v0.14.2 release of skimage does define __version__. See github.com/scikit-image/scikit-image/blob/v0.14.2/skimage/…
I followed the above link and do dir(skimage), and it only show ['doc', 'file', 'loader', 'name', 'package', 'path', 'spec']. There is no version and its variant.
@roudan That suggests that you're not importing the skimage package but rather a local module that happens to be named skimage.py. Could you check what skimage.__file__ is?
Thanks Brian, then how do I import skimage? I was using import skimage
I did again try to remove skimage: (skimage14) by using conda remove skimage Collecting package metadata (repodata.json): done Solving environment: failed PackagesNotFoundError: The following packages are missing from the target environment: - skimage . It show package not found. so I reinstalled it using pip install scikit-image==0.14.2. Then it said requirement satisfied. I think something wrong with this skimage. How do I completely remove it and reinstall it? Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.