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

Import fails #9

Closed
SeanPedersen opened this issue Oct 26, 2024 · 3 comments
Closed

Import fails #9

SeanPedersen opened this issue Oct 26, 2024 · 3 comments

Comments

@SeanPedersen
Copy link

After the successful pip install, I tried to import neofuzz but received this error:

AttributeError                            Traceback (most recent call last)
Cell In[112], [line 1](vscode-notebook-cell:?execution_count=112&line=1)
----> [1](vscode-notebook-cell:?execution_count=112&line=1) from neofuzz import char_ngram_process

File ~/Projects/NeoTree/.venv/lib/python3.12/site-packages/neofuzz/__init__.py:1
----> [1](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/neofuzz/__init__.py:1) from neofuzz.process import Process, char_ngram_process
      [3](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/neofuzz/__init__.py:3) all = [Process, char_ngram_process]

File ~/Projects/NeoTree/.venv/lib/python3.12/site-packages/neofuzz/process.py:7
      [5](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/neofuzz/process.py:5) import joblib
      [6](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/neofuzz/process.py:6) import numpy as np
----> [7](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/neofuzz/process.py:7) import pynndescent
      [8](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/neofuzz/process.py:8) from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
      [9](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/neofuzz/process.py:9) from sklearn.metrics import pairwise_distances

File ~/Projects/NeoTree/.venv/lib/python3.12/site-packages/pynndescent/__init__.py:5
      [1](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/pynndescent/__init__.py:1) import sys
      [3](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/pynndescent/__init__.py:3) import numba
----> [5](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/pynndescent/__init__.py:5) from .pynndescent_ import NNDescent, PyNNDescentTransformer
      [7](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/pynndescent/__init__.py:7) if sys.version_info[:2] >= (3, 8):
      [8](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/pynndescent/__init__.py:8)     import importlib.metadata as importlib_metadata

File ~/Projects/NeoTree/.venv/lib/python3.12/site-packages/pynndescent/pynndescent_.py:23
     [20](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/pynndescent/pynndescent_.py:20) import heapq
...
   (...)
    [405](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/numpy/__init__.py:405)                 "\nOtherwise report this to the vendor "
    [406](https://jupytext+.vscode-resource.vscode-cdn.net/Users/Studio-MacMini/Projects/NeoTree/backend/search/~/Projects/NeoTree/.venv/lib/python3.12/site-packages/numpy/__init__.py:406)                 "that provided NumPy.\n\n{}\n".format(error_message))

AttributeError: `np.infty` was removed in the NumPy 2.0 release. Use `np.inf` instead.

Seems numpy version is incompatible... should be an easy fix

@SeanPedersen
Copy link
Author

ok install in a clean env works. This lib is just incompatible with new versions of numpy and tokenizers. would be nice to have an updated release which is compatible with newer versions of numpy and tokenizers

@x-tabdeveloping
Copy link
Owner

Hi again. I felt it was safer to keep the numpy version locked when I published the last release, because Numba typically progresses rather slowly with these things. I will look into this though, thanks for informing me about the issue.

@x-tabdeveloping
Copy link
Owner

Since it's the same issue as #12 I'll close this

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

No branches or pull requests

2 participants