How to update the compatible tags in `pip` in `conda` environments?
I tried to install a custom package through pip in a conda environment for python 3.9 (created using miniconda by conda create -n py39 python=3.9). When I run pip install -i <custom index> my_package, it would fail. However, when I revert to native python in MacOSX, I can install it successfully.
In conda environment py39: When I look at the output of pip install -vv -i <custom index> my_package, I can see pip was looking through the available wheels from <custom_index> and all of them failed to match the compatible tags listed in pip debug --verbose.
In native python 3.9: the output of pip install -vv -i <custom index> my_package indicates that it found a match for the wheel tag cp39-cp39-macosx_11_0_universal2.
Obviously my system supports the package, because native python pip managed to install it, but somehow pip in conda environment does not include the tag. In fact, the pip in conda environment only supports tags up to macosx_10_16, which is quite old. Is there a way to update the compatible tags?
In the conda environment, I tried doing python3 -c "import packaging.tags; print(list(packaging.tags.sys_tags()))", and from the output I can see cp39-cp39-macosx_11_0_universal2, that means pip should also accept that tag, isn’t that right?
Read more here: Source link
