VirSorter2
VirSorter2 copied to clipboard
Numpy float error not fixed in version 2.2.4
The same error as described in this resolved issue seems to be happening again (https://github.com/jiarong/VirSorter2/issues/145).
In step 3 I get an error in rule classify-by_group, when checking the log I get the same np.float being deprecated for the builtin 'float' from numpy.
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
The error was marked as solved in the conda version (install option 1) and in the development version (install option 2). I recreated the error using both install method, on both the provided test file as well as another simple fasta file of my own. I also tried to add 'numpy<1.24' to the second install' environment creation command and got the same error.
I have not tried install option 3 as it is not suitable with my larger workflow.
Can you advise on how to fix this? I will attempt to manually downgrade to numpy 1.20 in the meantime, will update this issue if this works.
Attached are the log file, let me know if you need more information.
This is run
Hi, it looks like somehow you have set python to use packages installed in /home/ahynes/.local
. It should be something done globally on your system, nothing to do w/ VS2. There could be many ways, and one is to simply rename that folder.
Hi @DNADoubleFelix, the same error was returned after installing the numpy<1.24 in my vs2 virtual env because it is still calling the numpy package in the base environment, which will cause conflicts between the numpy version and vs2 scripts.
The error was fixed after disabling the ENABLE_USER_SITE in the site.py file of the vs2 env.
python -m site -help
to get the path to the site.py of the vs2 env. And set ENABLE_USER_SITE = False
in the site.py file. https://github.com/python/cpython/blob/f59c0932b4e160f279fb98de4cdad2f58269e0a5/Lib/site.py#L79-L81
Hope this can help you.