-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix pip related requirements issue #55
Comments
@multimeric |
Yep. The PR that fixed this is pypa/pip#12095. You'll note that one of my issues is linked to that PR. The one-sentence summary they use in the changelog is "Improve extras resolution for multiple constraints on same base package." |
Specifically, the things we can do once we enforce a newer pip are:
|
I also ran into installation issues with pip v23.3.1 on Windows mamba create -n lattice python=3.10
mamba activate lattice
pip install napari-lattice The installation gets stuck with the following message:
p.s. I am not sure if this is the same bug. let me know and I'll open a new one |
Hi @thawn Cheers |
Hi @pr4deepr, I can confirm that installation works on a windows server 2019 machine. However, the problem occurs on Windows 11. pip install napari-lattice "scikit-image>=0.20.0" maybe consider making that part of the dependencies? Cheers, Till Here is what I did in detailI now cleaned the pip and conda/mamba caches and set up a fresh environment with python 3.11 pip cache purge
mamba clean -ay
mamba create -n lattice python=3.11
mamba activate lattice this gives me pip 23.3.2: pip --version
pip 23.3.2 from C:\Users\Till\mambaforge\envs\lattice\Lib\site-packages\pip (python 3.11) just to be on the safe side, I cleaned the caches again: pip cache purge
mamba clean -ay and then installed pip install napari-lattice this again tries to build several versions of scikit_image: INFO: pip is looking at multiple versions of scikit-image to determine which version is compatible with other requirements. This could take a while.
Collecting scikit-image!=0.20.0,>=0.18.0 (from pyclesperanto-prototype>=0.20.0->napari-lattice)
Downloading scikit_image-0.21.0-cp311-cp311-win_amd64.whl.metadata (14 kB)
Downloading scikit-image-0.19.3.tar.gz (22.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 22.2/22.2 MB 46.7 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... / and ultimately fails: INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
INFO: customize MSVCCompiler
INFO: customize MSVCCompiler using ConditionalOpenMP
INFO: CCompilerOpt.cc_test_flags[1086] : testing flags (/O2)
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
INFO: CCompilerOpt.cache_flush[864] : write cache to path -> C:\Users\Till\AppData\Local\Temp\pip-install-uciz7o_h\scikit-image_8d7cc58706bc48e686fa307b46169a35\build\temp.win-amd64-3.11\Release\ccompiler_opt_cache_ext.py
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for scikit-image
Building wheel for asciitree (setup.py) ... done
Created wheel for asciitree: filename=asciitree-0.3.3-py3-none-any.whl size=5047 sha256=808f5dd25749e43fcc8e400064efbab51b2e85a09eb33bd17c9f5821f12cb27f
Stored in directory: c:\users\till\appdata\local\pip\cache\wheels\71\c1\da\23077eb3b87d24d6f3852ed1ed1a1ac2d3c885ad6ebd2b4a07
Successfully built read-roi pims reikna asciitree
Failed to build scikit-image
ERROR: Could not build wheels for scikit-image, which is required to install pyproject.toml-based projects I checked and Microsoft C++ Bild Tools 2022 is installed (version 17.8.3) and io and behold if I do pip install napari-lattice "scikit-image>=0.20.0" it works. |
p.s. I also found this: https://forum.image.sc/t/pip-install-scikit-image-fails-windows11-python3-11/73311 but I guess restricting to scikit-image>=0.20.0 is better than restricting to python<3.11 |
Hi Till. My feeling is that this is a different bug, but also related to installation. I think that your environment is not set up to compile sk-image from source, so only binary (pre-compiled) packages are working for you. 0.19.3 specifically is failing for you because there are no binary wheels for that release, for your version of Python because Python 3.11 didn't exist at the time. I don't use Windows but I would double check that the C++ compiler is configured in such a way that Pip is able to find it. It might be possible to loosen some dependencies to get this to work with pure binary packages, but I can't guarantee it because it depends on what our dependencies do, which aren't in our control. |
Feedback from @pr4deepr:
|
Just noting that it takes 10:57 minutes to install the The particular packages it gets stuck on are:
I might be able to reduce the installation time by enforcing a smaller range of versions for these packages, but this will reduce compatibility somewhat. This means it will not work as well inside an existing environment that has other packages as well. |
One proposed solution to this was to build a conda package, although as discussed here, this isn't particularly simple. However something that's very promising is |
TODO:
|
the pip bug that was causing installation issues has been fixed as of pip 23.3, so if you are interested we could fix all the requirements in this repo and just ask users to update their pip?
The text was updated successfully, but these errors were encountered: