Closed EricR86 closed 2 years ago
That's very confusing. It should look for numpy if it can run from numpy.distutils.misc_util import get_info
. Can you try running python3 -c "from numpy.distutils.misc_util import get_info; print('worked')"
? It should print "worked" in both cases.
Both on an install with numpy features enabled and disabled both print the same message:
python3 -c "from numpy.distutils.misc_util import get_info; print('worked')"
<string>:1: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
worked
Which is what I expected. I specifically made sure numpy was in the environment in both cases. Even if I run the python3 -m pip install -vv --upgrade --force-reinstall pybigwig
command with the additional --no-deps
option (and numpy already installed) to ensure nothing gets re-installed, it still fails to build with numpy
features enabled.
What happens if you run pip cache remove pyBigWig
before installing from pypi? I got it installed using numpy (numpy 1.23.3) in either case, but I wonder if it's just cached a build without numpy in your case.
You're correct. --force-reinstall
apparently still uses the cached pypi version. I had installed with pyBigWig as a dependency and it did not detect numpy which is its own issue. Force reinstalling apparently used the cached version built locally.
Caching is the cause of and solution to all of life's problems :P
I cannot reliably get
pyBigWig
to install withnumpy
features enabled as a dependency. In a docker image withnumpy
pre-installed I can get two different outcomes depending on whether or not I install from source or not.For examples in the source directory (on current HEAD), if I run:
python3 -m pip install -vv --upgrade --force-reinstall .
numpy
features are enabledOutside the source directory if I run:
python3 -m pip install -vv --upgrade --force-reinstall pybigwig
numpy
features are disabledThis is very problematic to having
pyBigWig
as a dependency especially when thenumpy
features are needed.Thanks for your time.