Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help a Newbie: ImportError: cannot import name 'geometry' from 'skimage._shared' #5274

Closed
nuesslisimon opened this issue Mar 16, 2021 · 4 comments

Comments

@nuesslisimon
Copy link

nuesslisimon commented Mar 16, 2021

Hi! Thanks for your interest.
I am new to Python programming and am somewhat lost. Please excuse me posting anew in regard to this issue.

Description

After finding your YouTube video on "Image Analysis in Python with SciPy and scikit-image", I got to try setting up scikit-image to use with Spyder. I was following the install instructions from https://scikit-image.org/docs/dev/install.html. But end up getting an error (already discussed to some extent under #3832) when trying to use the skimage module. (Spyder_ErrorMessage.jpg)
Spyder_ErrorMessage

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "C:\Users\SimonNuessli\Downloads\ImageAnalysis\ImageAnalysis.py", line 3, in <module>
    from skimage import io

  File "C:\Users\SimonNuessli\miniconda3\envs\env_0\Lib\site-packages\skimage\__init__.py", line 124, in <module>
    _raise_build_error(e)

  File "C:\Users\SimonNuessli\miniconda3\envs\env_0\Lib\site-packages\skimage\__init__.py", line 104, in _raise_build_error
    %s""" % (e, msg))

ImportError: cannot import name 'geometry' from 'skimage._shared' (C:\Users\SimonNuessli\miniconda3\envs\env_0\Lib\site-packages\skimage\_shared\__init__.py)
It seems that scikit-image has not been built correctly.

Your install of scikit-image appears to be broken.
Try re-installing the package following the instructions at:
https://scikit-image.org/docs/stable/install.html 

What I did so far:

  • Created a conda environment (Conda_Env.jpg)
    Conda_Env
  • Installed scikit-image via conda forge (CondaForge-Install_Scikit-Image.jpg) as suggested in Import error cannot import name 'geometry' #3832 --> see under output 1.
    CondaForge-Install_Scikit-Image
  • Set Spyder python interpreter to conda environment (Spyder_PyInterpreter.jpg)
    Spyder_PyInterpreter
  • Set Spyder python path manager to conda environment / location of site-packages (Spyder_PyPathManager.jpg)
    Spyder_PyPathManager
  • "Checked" scikit-image installation with conda install (Conda-Install_Scikit-Image.jpg) as given in https://scikit-image.org/docs/dev/install.html --> output 2.
    Conda-Install_Scikit-Image
  • Tried to run the setup.py from ..\skimage --> output 3.

Way to reproduce

import skimage

Version information

Microsoft Windows Version 10.0.19042.804
with Visual Studio Build Tools 2019 19.9.1 (Visual C++ compiler)

(env_0) C:\Users\SimonNuessli\miniconda3\envs\env_0>python --version
Python 3.8.8

Paste the output of the following python commands

from future import print_function
import sys; print(sys.version)
import platform; print(platform.platform())
import skimage; print("scikit-image version: {}".format(skimage.version))
import numpy; print("numpy version: {}".format(numpy.version))

import sys; print(sys.version)
3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]

import platform; print(platform.platform())
Windows-10-10.0.19041-SP0

import skimage; print("scikit-image version: {}".format(skimage.__version__))
Traceback (most recent call last):

  File "C:\Users\SimonNuessli\miniconda3\envs\env_0\Lib\site-packages\skimage\__init__.py", line 119, in <module>
    from ._shared import geometry

ImportError: cannot import name 'geometry' from 'skimage._shared' (C:\Users\SimonNuessli\miniconda3\envs\env_0\Lib\site-packages\skimage\_shared\__init__.py)


During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "<ipython-input-12-2df732c8df90>", line 1, in <module>
    import skimage; print("scikit-image version: {}".format(skimage.__version__))

  File "C:\Users\SimonNuessli\miniconda3\envs\env_0\Lib\site-packages\skimage\__init__.py", line 122, in <module>
    _raise_build_error(e)

  File "C:\Users\SimonNuessli\miniconda3\envs\env_0\Lib\site-packages\skimage\__init__.py", line 102, in _raise_build_error
    %s""" % (e, msg))

ImportError: cannot import name 'geometry' from 'skimage._shared' (C:\Users\SimonNuessli\miniconda3\envs\env_0\Lib\site-packages\skimage\_shared\__init__.py)
It seems that scikit-image has not been built correctly.

Your install of scikit-image appears to be broken.
Try re-installing the package following the instructions at:
https://scikit-image.org/docs/stable/install.html 

import numpy; print("numpy version: {}".format(numpy.__version__))
numpy version: 1.19.3

Output

1.

(env_0) C:\Users\SimonNuessli>conda install -c conda-forge scikit-image
Collecting package metadata (current_repodata.json): done
Solving environment: done

Package Plan

  environment location: C:\Users\SimonNuessli\miniconda3\envs\env_0

  added / updated specs:
    - scikit-image


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    blosc-1.21.0               |       h0e60522_0         688 KB  conda-forge
    brotli-1.0.9               |       h0e60522_4         882 KB  conda-forge
    bzip2-1.0.8                |       h8ffe710_4         149 KB  conda-forge
    charls-2.2.0               |       h39d44d4_0          93 KB  conda-forge
    cloudpickle-1.6.0          |             py_0          22 KB  conda-forge
    cycler-0.10.0              |             py_2           9 KB  conda-forge
    cytoolz-0.11.0             |   py38h294d835_3         343 KB  conda-forge
    dask-core-2021.3.0         |     pyhd8ed1ab_0         702 KB  conda-forge
    decorator-4.4.2            |             py_0          11 KB  conda-forge
    freetype-2.10.4            |       h546665d_1         489 KB  conda-forge
    giflib-5.2.1               |       h8d14728_2          85 KB  conda-forge
    imagecodecs-2021.1.28      |   py38hb9201fa_0         6.4 MB  conda-forge
    imageio-2.9.0              |             py_0         3.1 MB  conda-forge
    intel-openmp-2020.3        |     h57928b3_311         2.0 MB  conda-forge
    jpeg-9d                    |       h8ffe710_0         366 KB  conda-forge
    jxrlib-1.1                 |       h8ffe710_2         620 KB  conda-forge
    kiwisolver-1.3.1           |   py38hbd9d945_1          58 KB  conda-forge
    lcms2-2.12                 |       h2a16943_0         882 KB  conda-forge
    lerc-2.2.1                 |       h0e60522_0         133 KB  conda-forge
    libaec-1.0.4               |       h39d44d4_1          31 KB  conda-forge
    libblas-3.9.0              |            8_mkl         3.9 MB  conda-forge
    libcblas-3.9.0             |            8_mkl         3.9 MB  conda-forge
    libdeflate-1.7             |       h8ffe710_5          61 KB  conda-forge
    liblapack-3.9.0            |            8_mkl         3.9 MB  conda-forge
    libpng-1.6.37              |       h1d00b33_2         724 KB  conda-forge
    libtiff-4.2.0              |       hc10be44_0         1.1 MB  conda-forge
    libwebp-base-1.2.0         |       h8ffe710_0         367 KB  conda-forge
    libzopfli-1.0.3            |       h0e60522_0         203 KB  conda-forge
    lz4-c-1.9.3                |       h8ffe710_0         134 KB  conda-forge
    m2w64-gcc-libgfortran-5.3.0|                6         342 KB  conda-forge
    m2w64-gcc-libs-5.3.0       |                7         520 KB  conda-forge
    m2w64-gcc-libs-core-5.3.0  |                7         214 KB  conda-forge
    m2w64-gmp-6.1.0            |                2         726 KB  conda-forge
    m2w64-libwinpthread-git-5.0.0.4634.697f757|                2          31 KB  conda-forge
    matplotlib-base-3.3.4      |   py38h34ddff4_0         6.8 MB  conda-forge
    mkl-2020.4                 |     hb70f87d_311       172.4 MB  conda-forge
    msys2-conda-epoch-20160418 |                1           3 KB  conda-forge
    networkx-2.5               |             py_0         1.2 MB  conda-forge
    numpy-1.20.1               |   py38h0cc643e_0         5.3 MB  conda-forge
    olefile-0.46               |     pyh9f0ad1d_1          32 KB  conda-forge
    openjpeg-2.4.0             |       h48faf41_0         238 KB  conda-forge
    pillow-8.1.2               |   py38h9273828_0         774 KB  conda-forge
    pyparsing-2.4.7            |     pyh9f0ad1d_0          60 KB  conda-forge
    python-dateutil-2.8.1      |             py_0         220 KB  conda-forge
    pywavelets-1.1.1           |   py38h347fdf6_3         4.3 MB  conda-forge
    pyyaml-5.4.1               |   py38h294d835_0         159 KB  conda-forge
    scipy-1.6.0                |   py38h5f893b4_0        23.3 MB  conda-forge
    six-1.15.0                 |     pyh9f0ad1d_0          14 KB  conda-forge
    snappy-1.1.8               |       ha925a31_3          50 KB  conda-forge
    tifffile-2021.3.5          |     pyhd8ed1ab_0         127 KB  conda-forge
    tk-8.6.10                  |       h8ffe710_1         3.2 MB  conda-forge
    toolz-0.11.1               |             py_0          46 KB  conda-forge
    tornado-6.1                |   py38h294d835_1         649 KB  conda-forge
    xz-5.2.5                   |       h62dcd97_1         211 KB  conda-forge
    yaml-0.2.5                 |       he774522_0          61 KB  conda-forge
    zfp-0.5.5                  |       h0e60522_4         150 KB  conda-forge
    zlib-1.2.11                |    h62dcd97_1010         126 KB  conda-forge
    zstd-1.4.9                 |       h6255e5f_0         915 KB  conda-forge
    ------------------------------------------------------------
                                           Total:       253.1 MB

The following NEW packages will be INSTALLED:

  appdirs            conda-forge/noarch::appdirs-1.4.4-pyh9f0ad1d_0
  blosc              conda-forge/win-64::blosc-1.21.0-h0e60522_0
  brotli             conda-forge/win-64::brotli-1.0.9-h0e60522_4
  brotlipy           conda-forge/win-64::brotlipy-0.7.0-py38h294d835_1001
  bzip2              conda-forge/win-64::bzip2-1.0.8-h8ffe710_4
  cffi               conda-forge/win-64::cffi-1.14.5-py38hd8c33c5_0
  chardet            conda-forge/win-64::chardet-4.0.0-py38haa244fe_1
  charls             conda-forge/win-64::charls-2.2.0-h39d44d4_0
  cloudpickle        conda-forge/noarch::cloudpickle-1.6.0-py_0
  cryptography       conda-forge/win-64::cryptography-3.4.6-py38hd7da0ea_0
  cycler             conda-forge/noarch::cycler-0.10.0-py_2
  cytoolz            conda-forge/win-64::cytoolz-0.11.0-py38h294d835_3
  dask-core          conda-forge/noarch::dask-core-2021.3.0-pyhd8ed1ab_0
  decorator          conda-forge/noarch::decorator-4.4.2-py_0
  freetype           conda-forge/win-64::freetype-2.10.4-h546665d_1
  giflib             conda-forge/win-64::giflib-5.2.1-h8d14728_2
  idna               conda-forge/noarch::idna-2.10-pyh9f0ad1d_0
  imagecodecs        conda-forge/win-64::imagecodecs-2021.1.28-py38hb9201fa_0
  imageio            conda-forge/noarch::imageio-2.9.0-py_0
  intel-openmp       conda-forge/win-64::intel-openmp-2020.3-h57928b3_311
  jpeg               conda-forge/win-64::jpeg-9d-h8ffe710_0
  jxrlib             conda-forge/win-64::jxrlib-1.1-h8ffe710_2
  kiwisolver         conda-forge/win-64::kiwisolver-1.3.1-py38hbd9d945_1
  lcms2              conda-forge/win-64::lcms2-2.12-h2a16943_0
  lerc               conda-forge/win-64::lerc-2.2.1-h0e60522_0
  libaec             conda-forge/win-64::libaec-1.0.4-h39d44d4_1
  libblas            conda-forge/win-64::libblas-3.9.0-8_mkl
  libcblas           conda-forge/win-64::libcblas-3.9.0-8_mkl
  libdeflate         conda-forge/win-64::libdeflate-1.7-h8ffe710_5
  liblapack          conda-forge/win-64::liblapack-3.9.0-8_mkl
  libpng             conda-forge/win-64::libpng-1.6.37-h1d00b33_2
  libtiff            conda-forge/win-64::libtiff-4.2.0-hc10be44_0
  libwebp-base       conda-forge/win-64::libwebp-base-1.2.0-h8ffe710_0
  libzopfli          conda-forge/win-64::libzopfli-1.0.3-h0e60522_0
  lz4-c              conda-forge/win-64::lz4-c-1.9.3-h8ffe710_0
  m2w64-gcc-libgfor~ conda-forge/win-64::m2w64-gcc-libgfortran-5.3.0-6
  m2w64-gcc-libs     conda-forge/win-64::m2w64-gcc-libs-5.3.0-7
  m2w64-gcc-libs-co~ conda-forge/win-64::m2w64-gcc-libs-core-5.3.0-7
  m2w64-gmp          conda-forge/win-64::m2w64-gmp-6.1.0-2
  m2w64-libwinpthre~ conda-forge/win-64::m2w64-libwinpthread-git-5.0.0.4634.697f757-2
  matplotlib-base    conda-forge/win-64::matplotlib-base-3.3.4-py38h34ddff4_0
  mkl                conda-forge/win-64::mkl-2020.4-hb70f87d_311
  msys2-conda-epoch  conda-forge/win-64::msys2-conda-epoch-20160418-1
  networkx           conda-forge/noarch::networkx-2.5-py_0
  numpy              conda-forge/win-64::numpy-1.20.1-py38h0cc643e_0
  olefile            conda-forge/noarch::olefile-0.46-pyh9f0ad1d_1
  openjpeg           conda-forge/win-64::openjpeg-2.4.0-h48faf41_0
  packaging          conda-forge/noarch::packaging-20.9-pyh44b312d_0
  pillow             conda-forge/win-64::pillow-8.1.2-py38h9273828_0
  pooch              conda-forge/noarch::pooch-1.3.0-pyhd8ed1ab_0
  pycparser          conda-forge/noarch::pycparser-2.20-pyh9f0ad1d_2
  pyopenssl          conda-forge/noarch::pyopenssl-20.0.1-pyhd8ed1ab_0
  pyparsing          conda-forge/noarch::pyparsing-2.4.7-pyh9f0ad1d_0
  pysocks            conda-forge/win-64::pysocks-1.7.1-py38haa244fe_3
  python-dateutil    conda-forge/noarch::python-dateutil-2.8.1-py_0
  python_abi         conda-forge/win-64::python_abi-3.8-1_cp38
  pywavelets         conda-forge/win-64::pywavelets-1.1.1-py38h347fdf6_3
  pyyaml             conda-forge/win-64::pyyaml-5.4.1-py38h294d835_0
  requests           conda-forge/noarch::requests-2.25.1-pyhd3deb0d_0
  scikit-image       conda-forge/win-64::scikit-image-0.18.1-py38h4c96930_0
  scipy              conda-forge/win-64::scipy-1.6.0-py38h5f893b4_0
  six                conda-forge/noarch::six-1.15.0-pyh9f0ad1d_0
  snappy             conda-forge/win-64::snappy-1.1.8-ha925a31_3
  tifffile           conda-forge/noarch::tifffile-2021.3.5-pyhd8ed1ab_0
  tk                 conda-forge/win-64::tk-8.6.10-h8ffe710_1
  toolz              conda-forge/noarch::toolz-0.11.1-py_0
  tornado            conda-forge/win-64::tornado-6.1-py38h294d835_1
  urllib3            conda-forge/noarch::urllib3-1.26.4-pyhd8ed1ab_0
  win_inet_pton      conda-forge/win-64::win_inet_pton-1.1.0-py38haa244fe_2
  xz                 conda-forge/win-64::xz-5.2.5-h62dcd97_1
  yaml               conda-forge/win-64::yaml-0.2.5-he774522_0
  zfp                conda-forge/win-64::zfp-0.5.5-h0e60522_4
  zlib               conda-forge/win-64::zlib-1.2.11-h62dcd97_1010
  zstd               conda-forge/win-64::zstd-1.4.9-h6255e5f_0

The following packages will be UPDATED:

  certifi            pkgs/main::certifi-2020.12.5-py38haa9~ --> conda-forge::certifi-2020.12.5-py38haa244fe_1

The following packages will be SUPERSEDED by a higher-priority channel:

  ca-certificates    pkgs/main::ca-certificates-2021.1.19-~ --> conda-forge::ca-certificates-2020.12.5-h5b45459_0
  openssl              pkgs/main::openssl-1.1.1j-h2bbff1b_0 --> conda-forge::openssl-1.1.1j-h8ffe710_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
mkl-2020.4           | 172.4 MB  | ########################################################################################################################################################### | 100%
tornado-6.1          | 649 KB    | ########################################################################################################################################################### | 100%
cycler-0.10.0        | 9 KB      | ########################################################################################################################################################### | 100%
jxrlib-1.1           | 620 KB    | ########################################################################################################################################################### | 100%
liblapack-3.9.0      | 3.9 MB    | ########################################################################################################################################################### | 100%
msys2-conda-epoch-20 | 3 KB      | ########################################################################################################################################################### | 100%
networkx-2.5         | 1.2 MB    | ########################################################################################################################################################### | 100%
zstd-1.4.9           | 915 KB    | ########################################################################################################################################################### | 100%
lz4-c-1.9.3          | 134 KB    | ########################################################################################################################################################### | 100%
xz-5.2.5             | 211 KB    | ########################################################################################################################################################### | 100%
giflib-5.2.1         | 85 KB     | ########################################################################################################################################################### | 100%
olefile-0.46         | 32 KB     | ########################################################################################################################################################### | 100%
imagecodecs-2021.1.2 | 6.4 MB    | ########################################################################################################################################################### | 100%
pyyaml-5.4.1         | 159 KB    | ########################################################################################################################################################### | 100%
cytoolz-0.11.0       | 343 KB    | ########################################################################################################################################################### | 100%
m2w64-gcc-libs-5.3.0 | 520 KB    | ########################################################################################################################################################### | 100%
libwebp-base-1.2.0   | 367 KB    | ########################################################################################################################################################### | 100%
toolz-0.11.1         | 46 KB     | ########################################################################################################################################################### | 100%
m2w64-gcc-libs-core- | 214 KB    | ########################################################################################################################################################### | 100%
libtiff-4.2.0        | 1.1 MB    | ########################################################################################################################################################### | 100%
m2w64-gmp-6.1.0      | 726 KB    | ########################################################################################################################################################### | 100%
scipy-1.6.0          | 23.3 MB   | ########################################################################################################################################################### | 100%
cloudpickle-1.6.0    | 22 KB     | ########################################################################################################################################################### | 100%
zlib-1.2.11          | 126 KB    | ########################################################################################################################################################### | 100%
imageio-2.9.0        | 3.1 MB    | ########################################################################################################################################################### | 100%
pywavelets-1.1.1     | 4.3 MB    | ########################################################################################################################################################### | 100%
jpeg-9d              | 366 KB    | ########################################################################################################################################################### | 100%
tk-8.6.10            | 3.2 MB    | ########################################################################################################################################################### | 100%
pillow-8.1.2         | 774 KB    | ########################################################################################################################################################### | 100%
libcblas-3.9.0       | 3.9 MB    | ########################################################################################################################################################### | 100%
libpng-1.6.37        | 724 KB    | ########################################################################################################################################################### | 100%
libzopfli-1.0.3      | 203 KB    | ########################################################################################################################################################### | 100%
libblas-3.9.0        | 3.9 MB    | ########################################################################################################################################################### | 100%
decorator-4.4.2      | 11 KB     | ########################################################################################################################################################### | 100%
brotli-1.0.9         | 882 KB    | ########################################################################################################################################################### | 100%
m2w64-gcc-libgfortra | 342 KB    | ########################################################################################################################################################### | 100%
openjpeg-2.4.0       | 238 KB    | ########################################################################################################################################################### | 100%
blosc-1.21.0         | 688 KB    | ########################################################################################################################################################### | 100%
libaec-1.0.4         | 31 KB     | ########################################################################################################################################################### | 100%
pyparsing-2.4.7      | 60 KB     | ########################################################################################################################################################### | 100%
bzip2-1.0.8          | 149 KB    | ########################################################################################################################################################### | 100%
m2w64-libwinpthread- | 31 KB     | ########################################################################################################################################################### | 100%
charls-2.2.0         | 93 KB     | ########################################################################################################################################################### | 100%
snappy-1.1.8         | 50 KB     | ########################################################################################################################################################### | 100%
numpy-1.20.1         | 5.3 MB    | ########################################################################################################################################################### | 100%
kiwisolver-1.3.1     | 58 KB     | ########################################################################################################################################################### | 100%
yaml-0.2.5           | 61 KB     | ########################################################################################################################################################### | 100%
tifffile-2021.3.5    | 127 KB    | ########################################################################################################################################################### | 100%
python-dateutil-2.8. | 220 KB    | ########################################################################################################################################################### | 100%
intel-openmp-2020.3  | 2.0 MB    | ########################################################################################################################################################### | 100%
six-1.15.0           | 14 KB     | ########################################################################################################################################################### | 100%
libdeflate-1.7       | 61 KB     | ########################################################################################################################################################### | 100%
lerc-2.2.1           | 133 KB    | ########################################################################################################################################################### | 100%
dask-core-2021.3.0   | 702 KB    | ########################################################################################################################################################### | 100%
lcms2-2.12           | 882 KB    | ########################################################################################################################################################### | 100%
matplotlib-base-3.3. | 6.8 MB    | ########################################################################################################################################################### | 100%
zfp-0.5.5            | 150 KB    | ########################################################################################################################################################### | 100%
freetype-2.10.4      | 489 KB    | ########################################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

2.


(env_0) C:\Users\SimonNuessli\miniconda3\envs\env_0>conda install scikit-image
Collecting package metadata (current_repodata.json): done
Solving environment: done

Package Plan

  environment location: C:\Users\SimonNuessli\miniconda3\envs\env_0

  added / updated specs:
    - scikit-image


The following packages will be UPDATED:

  ca-certificates    conda-forge::ca-certificates-2020.12.~ --> pkgs/main::ca-certificates-2021.1.19-haa95532_1

The following packages will be SUPERSEDED by a higher-priority channel:

  certifi            conda-forge::certifi-2020.12.5-py38ha~ --> pkgs/main::certifi-2020.12.5-py38haa95532_0
  openssl            conda-forge::openssl-1.1.1j-h8ffe710_0 --> pkgs/main::openssl-1.1.1j-h2bbff1b_0
  scikit-image       conda-forge::scikit-image-0.18.1-py38~ --> pkgs/main::scikit-image-0.17.2-py38h1e1f486_0


Proceed ([y]/n)? y

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

3.

(env_0) C:\Users\SimonNuessli\miniconda3\envs\env_0\Lib\site-packages\skimage>python setup.py build_ext --inplace install
Traceback (most recent call last):
  File "setup.py", line 31, in <module>
    config = configuration(top_path='').todict()
  File "setup.py", line 9, in configuration
    config.add_subpackage('_shared')
  File "C:\Users\SimonNuessli\miniconda3\envs\env_0\lib\site-packages\numpy\distutils\misc_util.py", line 1019, in add_subpackage
    config_list = self.get_subpackage(subpackage_name, subpackage_path,
  File "C:\Users\SimonNuessli\miniconda3\envs\env_0\lib\site-packages\numpy\distutils\misc_util.py", line 985, in get_subpackage
    config = self._get_configuration_from_setup_py(
  File "C:\Users\SimonNuessli\miniconda3\envs\env_0\lib\site-packages\numpy\distutils\misc_util.py", line 927, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File ".\_shared\setup.py", line 15, in configuration
    cython(['geometry.pyx',
  File "C:\Users\SimonNuessli\miniconda3\envs\env_0\lib\site-packages\skimage\_build.py", line 65, in cython
    cythonize(pyx_files, nthreads=cpu_count(),
  File "C:\Users\SimonNuessli\miniconda3\envs\env_0\lib\site-packages\Cython\Build\Dependencies.py", line 965, in cythonize
    module_list, module_metadata = create_extension_list(
  File "C:\Users\SimonNuessli\miniconda3\envs\env_0\lib\site-packages\Cython\Build\Dependencies.py", line 815, in create_extension_list
    for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
  File "C:\Users\SimonNuessli\miniconda3\envs\env_0\lib\site-packages\Cython\Build\Dependencies.py", line 114, in nonempty
    raise ValueError(error_msg)
ValueError: 'C:\Users\SimonNuessli\miniconda3\envs\env_0\Lib\site-packages\skimage\_shared\geometry.pyx' doesn't match any files
@nuesslisimon
Copy link
Author

Sorry this was a little early! Will be editing it from now on. Please excuse any inconveniences to the GitHub community etiquette.

@nuesslisimon nuesslisimon changed the title Help with getting started for Newbie to Python:ImportError: cannot import name 'geometry' from 'skimage._shared' Help with getting started for Newbie to Python: ImportError: cannot import name 'geometry' from 'skimage._shared' Mar 16, 2021
@nuesslisimon nuesslisimon changed the title Help with getting started for Newbie to Python: ImportError: cannot import name 'geometry' from 'skimage._shared' Help with getting started for Newbie to Python / SciKit : ImportError: cannot import name 'geometry' from 'skimage._shared' Mar 16, 2021
@nuesslisimon nuesslisimon changed the title Help with getting started for Newbie to Python / SciKit : ImportError: cannot import name 'geometry' from 'skimage._shared' Help a Newbie: ImportError: cannot import name 'geometry' from 'skimage._shared' Mar 16, 2021
@hmaarrfk
Copy link
Member

Try not to mix Vonda forge and the default anaconda channel.

You should add the conda forge channel to your configuration and not pick and choose when you enable it yhrought the command line.

Thanks for being so thorough when reproducing the issue.i think once you add the channel, you will be able to rebuild your environments and get things going.

@nuesslisimon
Copy link
Author

nuesslisimon commented Mar 16, 2021

Hi Mark

I did the following and now it works! Thanks! Your fast response time and accuracy in troubleshooting is as bit scary, but much appreciated. 💯 Have a good day.

(env_0) C:\Users\SimonNuessli>conda config --add channels conda-forge

(env_0) C:\Users\SimonNuessli>conda config --set channel_priority strict

(env_0) C:\Users\SimonNuessli>conda install -c conda-forge scikit-image
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: done
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: done

## Package Plan ##

  environment location: C:\Users\SimonNuessli\miniconda3\envs\env_0

  added / updated specs:
    - scikit-image


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    cython-0.29.22             |   py38h885f38d_0         1.9 MB  conda-forge
    pip-21.0.1                 |     pyhd8ed1ab_0         1.1 MB  conda-forge
    python-3.8.8               |h7840368_0_cpython        19.2 MB  conda-forge
    setuptools-49.6.0          |   py38haa244fe_3         962 KB  conda-forge
    sqlite-3.34.0              |       h8ffe710_0         1.2 MB  conda-forge
    vc-14.2                    |       hb210afc_4          13 KB  conda-forge
    vs2015_runtime-14.28.29325 |       h5e1d092_4         2.3 MB  conda-forge
    wheel-0.36.2               |     pyhd3deb0d_0          31 KB  conda-forge
    wincertstore-0.2           |py38haa244fe_1006          15 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        26.6 MB

The following packages will be UPDATED:

  certifi            pkgs/main::certifi-2020.12.5-py38haa9~ --> conda-forge::certifi-2020.12.5-py38haa244fe_1
  scikit-image       pkgs/main::scikit-image-0.17.2-py38h1~ --> conda-forge::scikit-image-0.18.1-py38h4c96930_0
  vc                          pkgs/main::vc-14.2-h21ff451_1 --> conda-forge::vc-14.2-hb210afc_4
  vs2015_runtime     pkgs/main::vs2015_runtime-14.27.29016~ --> conda-forge::vs2015_runtime-14.28.29325-h5e1d092_4
  wincertstore           pkgs/main::wincertstore-0.2-py38_0 --> conda-forge::wincertstore-0.2-py38haa244fe_1006

The following packages will be SUPERSEDED by a higher-priority channel:

  ca-certificates    pkgs/main::ca-certificates-2021.1.19-~ --> conda-forge::ca-certificates-2020.12.5-h5b45459_0
  cython             pkgs/main::cython-0.29.22-py38hd77b12~ --> conda-forge::cython-0.29.22-py38h885f38d_0
  openssl              pkgs/main::openssl-1.1.1j-h2bbff1b_0 --> conda-forge::openssl-1.1.1j-h8ffe710_0
  pip                pkgs/main/win-64::pip-21.0.1-py38haa9~ --> conda-forge/noarch::pip-21.0.1-pyhd8ed1ab_0
  python                 pkgs/main::python-3.8.8-hdbf39b2_4 --> conda-forge::python-3.8.8-h7840368_0_cpython
  setuptools         pkgs/main::setuptools-52.0.0-py38haa9~ --> conda-forge::setuptools-49.6.0-py38haa244fe_3
  sqlite                pkgs/main::sqlite-3.35.0-h2bbff1b_0 --> conda-forge::sqlite-3.34.0-h8ffe710_0
  wheel                pkgs/main::wheel-0.36.2-pyhd3eb1b0_0 --> conda-forge::wheel-0.36.2-pyhd3deb0d_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
setuptools-49.6.0    | 962 KB    | ########################################################################################################################################################### | 100%
vs2015_runtime-14.28 | 2.3 MB    | ########################################################################################################################################################### | 100%
sqlite-3.34.0        | 1.2 MB    | ########################################################################################################################################################### | 100%
pip-21.0.1           | 1.1 MB    | ########################################################################################################################################################### | 100%
cython-0.29.22       | 1.9 MB    | ########################################################################################################################################################### | 100%
vc-14.2              | 13 KB     | ########################################################################################################################################################### | 100%
wincertstore-0.2     | 15 KB     | ########################################################################################################################################################### | 100%
python-3.8.8         | 19.2 MB   | ########################################################################################################################################################### | 100%
wheel-0.36.2         | 31 KB     | ########################################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(698): An error occurred while installing package 'conda-forge::openssl-1.1.1j-h8ffe710_0'.
Rolling back transaction: done

[Errno 13] Permission denied: 'C:\\Users\\SimonNuessli\\miniconda3\\envs\\env_0\\Library\\bin\\libssl-1_1-x64.dll'
()


(env_0) C:\Users\SimonNuessli>conda update -n base -c defaults conda
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\SimonNuessli\miniconda3

  added / updated specs:
    - conda


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    urllib3-1.26.4             |     pyhd3eb1b0_0         105 KB
    ------------------------------------------------------------
                                           Total:         105 KB

The following packages will be UPDATED:

  urllib3                               1.26.3-pyhd3eb1b0_0 --> 1.26.4-pyhd3eb1b0_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
urllib3-1.26.4       | 105 KB    | ########################################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(env_0) C:\Users\SimonNuessli>conda install -c conda-forge scikit-image
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: done
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: done

## Package Plan ##

  environment location: C:\Users\SimonNuessli\miniconda3\envs\env_0

  added / updated specs:
    - scikit-image


The following packages will be UPDATED:

  certifi            pkgs/main::certifi-2020.12.5-py38haa9~ --> conda-forge::certifi-2020.12.5-py38haa244fe_1
  scikit-image       pkgs/main::scikit-image-0.17.2-py38h1~ --> conda-forge::scikit-image-0.18.1-py38h4c96930_0
  vc                          pkgs/main::vc-14.2-h21ff451_1 --> conda-forge::vc-14.2-hb210afc_4
  vs2015_runtime     pkgs/main::vs2015_runtime-14.27.29016~ --> conda-forge::vs2015_runtime-14.28.29325-h5e1d092_4
  wincertstore           pkgs/main::wincertstore-0.2-py38_0 --> conda-forge::wincertstore-0.2-py38haa244fe_1006

The following packages will be SUPERSEDED by a higher-priority channel:

  ca-certificates    pkgs/main::ca-certificates-2021.1.19-~ --> conda-forge::ca-certificates-2020.12.5-h5b45459_0
  cython             pkgs/main::cython-0.29.22-py38hd77b12~ --> conda-forge::cython-0.29.22-py38h885f38d_0
  openssl              pkgs/main::openssl-1.1.1j-h2bbff1b_0 --> conda-forge::openssl-1.1.1j-h8ffe710_0
  pip                pkgs/main/win-64::pip-21.0.1-py38haa9~ --> conda-forge/noarch::pip-21.0.1-pyhd8ed1ab_0
  python                 pkgs/main::python-3.8.8-hdbf39b2_4 --> conda-forge::python-3.8.8-h7840368_0_cpython
  setuptools         pkgs/main::setuptools-52.0.0-py38haa9~ --> conda-forge::setuptools-49.6.0-py38haa244fe_3
  sqlite                pkgs/main::sqlite-3.35.0-h2bbff1b_0 --> conda-forge::sqlite-3.34.0-h8ffe710_0
  wheel                pkgs/main::wheel-0.36.2-pyhd3eb1b0_0 --> conda-forge::wheel-0.36.2-pyhd3deb0d_0


Proceed ([y]/n)? y

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

(env_0) C:\Users\SimonNuessli>conda install spyder-kernels
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\SimonNuessli\miniconda3\envs\env_0

  added / updated specs:
    - spyder-kernels


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    backcall-0.2.0             |     pyh9f0ad1d_0          13 KB  conda-forge
    backports-1.0              |             py_2           4 KB  conda-forge
    backports.functools_lru_cache-1.6.1|             py_0           8 KB  conda-forge
    colorama-0.4.4             |     pyh9f0ad1d_0          18 KB  conda-forge
    ipykernel-5.5.0            |   py38hc5df569_1         167 KB  conda-forge
    ipython-7.21.0             |   py38hc5df569_0         1.1 MB  conda-forge
    ipython_genutils-0.2.0     |             py_1          21 KB  conda-forge
    jedi-0.18.0                |   py38haa244fe_2         931 KB  conda-forge
    jupyter_client-6.1.12      |     pyhd8ed1ab_0          79 KB  conda-forge
    jupyter_core-4.7.1         |   py38haa244fe_0          96 KB  conda-forge
    libsodium-1.0.18           |       h8d14728_1         697 KB  conda-forge
    parso-0.8.1                |     pyhd8ed1ab_0          67 KB  conda-forge
    pickleshare-0.7.5          |          py_1003           9 KB  conda-forge
    prompt-toolkit-3.0.17      |     pyha770c72_0         244 KB  conda-forge
    pygments-2.8.1             |     pyhd8ed1ab_0         736 KB  conda-forge
    pywin32-300                |   py38h294d835_0         7.0 MB  conda-forge
    pyzmq-22.0.3               |   py38h09162b1_1         700 KB  conda-forge
    spyder-kernels-1.10.2      |   py38haa244fe_0          99 KB  conda-forge
    traitlets-5.0.5            |             py_0          81 KB  conda-forge
    wcwidth-0.2.5              |     pyh9f0ad1d_2          33 KB  conda-forge
    zeromq-4.3.4               |       h0e60522_0         9.0 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        21.1 MB

The following NEW packages will be INSTALLED:

  backcall           conda-forge/noarch::backcall-0.2.0-pyh9f0ad1d_0
  backports          conda-forge/noarch::backports-1.0-py_2
  backports.functoo~ conda-forge/noarch::backports.functools_lru_cache-1.6.1-py_0
  colorama           conda-forge/noarch::colorama-0.4.4-pyh9f0ad1d_0
  ipykernel          conda-forge/win-64::ipykernel-5.5.0-py38hc5df569_1
  ipython            conda-forge/win-64::ipython-7.21.0-py38hc5df569_0
  ipython_genutils   conda-forge/noarch::ipython_genutils-0.2.0-py_1
  jedi               conda-forge/win-64::jedi-0.18.0-py38haa244fe_2
  jupyter_client     conda-forge/noarch::jupyter_client-6.1.12-pyhd8ed1ab_0
  jupyter_core       conda-forge/win-64::jupyter_core-4.7.1-py38haa244fe_0
  libsodium          conda-forge/win-64::libsodium-1.0.18-h8d14728_1
  parso              conda-forge/noarch::parso-0.8.1-pyhd8ed1ab_0
  pickleshare        conda-forge/noarch::pickleshare-0.7.5-py_1003
  prompt-toolkit     conda-forge/noarch::prompt-toolkit-3.0.17-pyha770c72_0
  pygments           conda-forge/noarch::pygments-2.8.1-pyhd8ed1ab_0
  pywin32            conda-forge/win-64::pywin32-300-py38h294d835_0
  pyzmq              conda-forge/win-64::pyzmq-22.0.3-py38h09162b1_1
  spyder-kernels     conda-forge/win-64::spyder-kernels-1.10.2-py38haa244fe_0
  traitlets          conda-forge/noarch::traitlets-5.0.5-py_0
  wcwidth            conda-forge/noarch::wcwidth-0.2.5-pyh9f0ad1d_2
  zeromq             conda-forge/win-64::zeromq-4.3.4-h0e60522_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
ipython_genutils-0.2 | 21 KB     | ########################################################################################################################################################### | 100%
spyder-kernels-1.10. | 99 KB     | ########################################################################################################################################################### | 100%
pyzmq-22.0.3         | 700 KB    | ########################################################################################################################################################### | 100%
parso-0.8.1          | 67 KB     | ########################################################################################################################################################### | 100%
wcwidth-0.2.5        | 33 KB     | ########################################################################################################################################################### | 100%
backports-1.0        | 4 KB      | ########################################################################################################################################################### | 100%
zeromq-4.3.4         | 9.0 MB    | ########################################################################################################################################################### | 100%
jupyter_core-4.7.1   | 96 KB     | ########################################################################################################################################################### | 100%
jupyter_client-6.1.1 | 79 KB     | ########################################################################################################################################################### | 100%
pickleshare-0.7.5    | 9 KB      | ########################################################################################################################################################### | 100%
pygments-2.8.1       | 736 KB    | ########################################################################################################################################################### | 100%
ipython-7.21.0       | 1.1 MB    | ########################################################################################################################################################### | 100%
jedi-0.18.0          | 931 KB    | ########################################################################################################################################################### | 100%
libsodium-1.0.18     | 697 KB    | ########################################################################################################################################################### | 100%
pywin32-300          | 7.0 MB    | ########################################################################################################################################################### | 100%
colorama-0.4.4       | 18 KB     | ########################################################################################################################################################### | 100%
backports.functools_ | 8 KB      | ########################################################################################################################################################### | 100%
ipykernel-5.5.0      | 167 KB    | ########################################################################################################################################################### | 100%
traitlets-5.0.5      | 81 KB     | ########################################################################################################################################################### | 100%
prompt-toolkit-3.0.1 | 244 KB    | ########################################################################################################################################################### | 100%
backcall-0.2.0       | 13 KB     | ########################################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

Look at that!

Spyder_WorkingImport

@hmaarrfk
Copy link
Member

Glad I was able to help. THanks for being thorough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants