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

numpy dependency incorrect #44

Open
DManowitz opened this issue May 3, 2023 · 7 comments · Fixed by #45
Open

numpy dependency incorrect #44

DManowitz opened this issue May 3, 2023 · 7 comments · Fixed by #45

Comments

@DManowitz
Copy link

As seen in the arraykit requirements.txt (https://github.com/static-frame/arraykit/blob/master/requirements.txt), since arraykit v0.2.4, the numpy dependency is numpy>=1.18.5. However, this package has the numpy dependency pinned at 1.18.5.

@flexatone
Copy link
Contributor

Thanks, @DManowitz , for posting this issue.

I was only trying to pin NumPy at 1.18.5 for Python 3.7 and 3.8, as shown here:

https://github.com/conda-forge/arraykit-feedstock/blob/main/recipe/meta.yaml

Are you using that version of Python, or you seeing this issue in a different context? If you are getting a specific error, please share it. In the mean time, even if you are using conda, you should be able to install arraykit wheels with pip.

I also notice that the Azure builds are failing; I will investigate that as well.

@DManowitz
Copy link
Author

DManowitz commented May 3, 2023

I am using it with Python 3.8. I noticed the issue with arraykit v0.2.3 and static-frame v1.3.1 installed. With that combination, I got the following error when trying to import static_frame:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "...\lib\site-packages\static_frame\__init__.py", line 9, in <module>
    from static_frame.core.archive_npy import NPY as NPY
  File "...\lib\site-packages\static_frame\core\archive_npy.py", line 16, in <module>
    from static_frame.core.container_util import ContainerMap
  File "...\lib\site-packages\static_frame\core\container_util.py", line 17, in <module>
    from static_frame.core.container import ContainerBase
  File "...\lib\site-packages\static_frame\core\container.py", line 7, in <module>
    from static_frame.core.display import Display
  File "...\lib\site-packages\static_frame\core\display.py", line 14, in <module>
    from static_frame.core.display_config import _DISPLAY_FORMAT_HTML
  File "...\lib\site-packages\static_frame\core\display_config.py", line 9, in <module>
    from static_frame.core.interface_meta import InterfaceMeta
  File "...\lib\site-packages\static_frame\core\interface_meta.py", line 3, in <module>
    from static_frame.core.doc_str import doc_inject
  File "...\lib\site-packages\static_frame\core\doc_str.py", line 8, in <module>
    from static_frame.core.util import AnyCallable
  File "...\lib\site-packages\static_frame\core\util.py", line 27, in <module>
    from arraykit import first_true_1d
ImportError: cannot import name 'first_true_1d' from 'arraykit' (C:\Users\manow\miniconda3\envs\py38_ml_TfGpuMain\lib\site-packages\arraykit\__init__.py)

At that point, I started to dig into why I got that error and found the issues with the dependencies for the static-frame and arraykit conda-forge packages vs their requirements as listed in their own repos.

@flexatone flexatone linked a pull request May 10, 2023 that will close this issue
5 tasks
@flexatone
Copy link
Contributor

I have removed the pinned NumPy for Python 3.7 and 3.8 and the build seems to work.

Thanks again for pointing this out.

@DManowitz
Copy link
Author

I see that the NumPy pin at 1.18.5 has been removed for this package for versions 3.4 and 4.0. However, there is an additional requirement of numpy >=1.24.3 now also. The requirements.txt for arraykit only shows numpy >=1.18.5, so why has this additional requirement been added?

@flexatone flexatone reopened this May 18, 2023
@DManowitz
Copy link
Author

Any updates on this? I see that the numpy >=1.24.3 requirement is still present for recent arraykit packages.

@flexatone
Copy link
Contributor

Hi @DManowitz , thanks for bringing this up, and apologies for the delay.

My best understanding is that this is out of my control. As you can see, the NumPy requirement that I specify in the conda recipe is numpy >= 1.18:

- numpy >=1.18.5

However, the conda build process, in producing the compiled packages, seems to define the requirement you are seeing elsewhere, and I do not see how I can change this. This is exactly why I was previously trying to pin 1.18.5 for Python 3.7 and 3.8.

The best alternative is to use pip (which you can do along with installing conda) to install pre-compiled wheels, which I make available for all platforms across many versions of Python. StaticFrame is actively tested using ArrayKit with NumPy 1.18.5 as shown in the requirements file used for those tests:

https://github.com/static-frame/static-frame/blob/master/requirements-test-backward.txt

Apologies for the challenges with this, but again, I think this is out of my control.

@DManowitz
Copy link
Author

@flexatone I forgot to mention this earlier, but you might want to try asking in the conda-forge discussion group about this issue and someone might know the fix for it.

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

Successfully merging a pull request may close this issue.

2 participants