TomographicImaging / CILViewer

A simple Viewer for 3D data built with VTK
Apache License 2.0
8 stars 6 forks source link

Installing with pip install now fails! #322

Closed lauramurgatroyd closed 1 year ago

lauramurgatroyd commented 1 year ago

Creating an environment with the environment.yml and then using pip install does not work and produces an error: image

I managed to resolve this by doing: conda install python=3.9 vtk=9.1 -c conda-forge and then 'pip install .' again

lauramurgatroyd commented 1 year ago

Might be due to a new version of VTK? 9.2.2 was released 10 days ago

lauramurgatroyd commented 1 year ago

The pip install . worked before then

lauramurgatroyd commented 1 year ago

https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/release/9.2.md

lauramurgatroyd commented 1 year ago

Using the environment file gives:

python 3.11.0 h9a09f29_0_cpython conda-forge python_abi 3.11 2_cp311 conda-forge vtk 9.2.2 qt_py311h2c833bd_204 conda-forge

lauramurgatroyd commented 1 year ago

I found that if I use the environment file and simply then do:

conda install python=3.9 -c conda-forge

Then pip install works.

By installing python 3.9, it changes which build of vtk 9.2.2 is used and I assume that is what fixes things:

environment location: C:\Users\lhe97136\Miniconda3\envs\cilviewer_dev3

added / updated specs:

  • python=3.9

The following packages will be DOWNGRADED:

aiohttp 3.8.3-py311ha68e1ae_1 --> 3.8.3-py39ha55989b_1 None frozenlist 1.3.1-py311ha68e1ae_1 --> 1.3.1-py39ha55989b_1 None h5py 3.7.0-nompi_py311h3a26632_102 --> 3.7.0-nompi_py39hbc6f334_102 None loguru 0.6.0-py311h1ea47a8_2 --> 0.6.0-py39hcbf5309_2 None multidict 6.0.2-py311ha68e1ae_2 --> 6.0.2-py39ha55989b_2 None numpy 1.23.4-py311h95d790f_1 --> 1.23.4-py39hbccbffa_1 None pillow 9.2.0-py311h97bb24d_3 --> 9.2.0-py39h595c93f_3 None pyside2 5.15.6-py311h2411a93_3 --> 5.15.6-py39h56cbfbc_3 None python 3.11.0-h9a09f29_0_cpython --> 3.9.13-h9a09f29_0_cpython None python_abi 3.11-2_cp311 --> 3.9-2_cp39 None vtk 9.2.2-qt_py311h2c833bd_204 --> 9.2.2-qt_py39h397e45c_204 None yarl 1.8.1-py311ha68e1ae_0 --> 1.8.1-py39ha55989b_0 None

https://anaconda.org/conda-forge/vtk/files?version=9.2.2

Alternatively, doing conda install python = 3.10 -c conda-forge also works

lauramurgatroyd commented 1 year ago

So maybe the way to resolve this is by limiting the python version in the environment file?

paskino commented 1 year ago

wait a minute, is pip taking care of the dependencies?

lauramurgatroyd commented 1 year ago

As suggested by @paskino , using pip install . --no-dependencies worked, without needing to modify the env file 🤔